13 #include "ee_x86_64_tsc.h" 15 #define USECS_PER_SEC 1000000 16 #define NSECS_PER_SEC 1000000000 32 tv->tv_sec += 946684800UL;
39 struct timeval current_time;
43 ret.sec = current_time.tv_sec;
44 ret.usec = current_time.tv_usec;
61 struct timeval start_time;
62 struct timeval timeout;
63 struct timeval stop_time;
68 timeradd(&start_time, &timeout, &stop_time);
70 self->stop_time.sec = stop_time.tv_sec;
71 self->stop_time.usec = stop_time.tv_usec;
76 struct timeval current_time;
77 struct timeval stop_time;
78 int is_not_yet_expired;
81 stop_time.tv_sec =
self->stop_time.sec;
82 stop_time.tv_usec =
self->stop_time.usec;
83 is_not_yet_expired =
timercmp (¤t_time, &stop_time, <);
91 return is_not_yet_expired ==
FALSE;
boolean osal_timer_is_expired(osal_timert *self)
void osal_free(void *ptr)
ec_timet osal_current_time(void)
void osal_time_diff(ec_timet *start, ec_timet *end, ec_timet *diff)
int osal_usleep(uint32 usec)
#define timercmp(a, b, CMP)
unsigned __int64 uint64_t
uint64_t osEE_x86_64_tsc_read(void)
#define timeradd(a, b, result)
void * osal_malloc(size_t size)
void ee_usleep(uint32 usec)
void osal_timer_start(osal_timert *self, uint32 timeout_usec)
int osal_gettimeofday(struct timeval *tv, struct timezone *tz)