blob: b97d988c75a731279d07b6ca4b4c64b6448d63de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include <time.h>
static unsigned long long curr_time_ns = 2000000000;//2s
static unsigned int curr_time_s = 0;
void stub_curr_time_ns_inc(unsigned long long time_ns)
{
curr_time_ns += time_ns;
return;
}
void stub_curr_time_s_inc(int time_s)
{
curr_time_s += time_s;
return;
}
unsigned long long stub_curr_time_ns_get()
{
return curr_time_ns;
}
/****************stub of time.h****************/
int clock_gettime (clockid_t __clock_id, struct timespec *__tp)
{
__tp->tv_sec = curr_time_s;
__tp->tv_nsec = curr_time_ns;
return 0;
}
/**********************************************/
|