28 #define USECS_PER_SEC 1000000 35 QueryPerformanceFrequency((LARGE_INTEGER *)&
sysfrequency);
38 QueryPerformanceCounter((LARGE_INTEGER *)&wintime);
40 tv->tv_sec = (long)(usecs / 1000000);
41 tv->tv_usec = (long)(usecs - (tv->tv_sec * 1000000));
48 struct timeval current_time;
52 return_value.sec = current_time.tv_sec;
53 return_value.usec = current_time.tv_usec;
59 struct timeval start_time;
60 struct timeval timeout;
61 struct timeval stop_time;
66 timeradd (&start_time, &timeout, &stop_time);
68 self->stop_time.sec = stop_time.tv_sec;
69 self->stop_time.usec = stop_time.tv_usec;
74 struct timeval current_time;
75 struct timeval stop_time;
76 int is_not_yet_expired;
79 stop_time.tv_sec =
self->stop_time.sec;
80 stop_time.tv_usec =
self->stop_time.usec;
81 is_not_yet_expired =
timercmp (¤t_time, &stop_time, <);
83 return is_not_yet_expired ==
FALSE;
88 SleepEx(usec / 1000,
FALSE);
ec_timet osal_current_time(void)
int osal_usleep(uint32 usec)
#define timeradd(a, b, result)
int osal_gettimeofday(struct timeval *tv, struct timezone *tz)
#define timercmp(a, b, CMP)
void osal_timer_start(osal_timert *self, uint32 timeout_usec)
static int64_t sysfrequency
boolean osal_timer_is_expired(const osal_timert *self)