39 inline void FARSA_UTIL_TEMPLATE
msleep(
unsigned int msec)
65 QueryPerformanceFrequency( &frequency );
66 QueryPerformanceCounter( &baseCount );
69 gettimeofday( &tv, NULL );
70 lastTime = tv.tv_sec*1000000 + tv.tv_usec;
77 QueryPerformanceCounter( &count );
78 count.QuadPart -= baseCount.QuadPart;
79 ticks = unsigned( count.QuadPart * LONGLONG (1000000) / frequency.QuadPart );
83 gettimeofday( &tv, NULL );
84 return (tv.tv_sec*1000000 + tv.tv_usec) - lastTime;
91 QueryPerformanceCounter( &count );
92 count.QuadPart -= baseCount.QuadPart;
93 ticks = unsigned( count.QuadPart * LONGLONG (1000000) / frequency.QuadPart );
98 gettimeofday( &tv, NULL );
99 int ret = (tv.tv_sec*1000000 + tv.tv_usec) - lastTime;
100 lastTime = (tv.tv_sec*1000000 + tv.tv_usec);
107 LARGE_INTEGER frequency;
108 LARGE_INTEGER baseCount;
This file contains the common type defitions used on the whole framework.
void FARSA_UTIL_TEMPLATE msleep(unsigned int msec)
A simple function to sleep for the given amount of milliseconds.
A macro to deprecate functions.
int tac()
return microsecond elapsed from last tic() call
SimpleTimer()
Construct the timer.
int tic()
return microsecond elapsed from last tic() call