Fixed compile error in module.

This commit is contained in:
skarg
2011-07-25 03:27:26 +00:00
parent aac4bb5dd4
commit 059a9e8471
+7 -6
View File
@@ -54,7 +54,7 @@ static uint32_t Timer_Period = 1;
* The resolution of _ftime() is 16 milliseconds * The resolution of _ftime() is 16 milliseconds
* The only way to get microseconds accuracy is to use QueryPerformanceCounter * The only way to get microseconds accuracy is to use QueryPerformanceCounter
*************************************************************************/ *************************************************************************/
#if 1 #if 0
int gettimeofday( int gettimeofday(
struct timeval *tp, struct timeval *tp,
void *tzp) void *tzp)
@@ -62,17 +62,18 @@ int gettimeofday(
/* QPC uses frequency and ticks */ /* QPC uses frequency and ticks */
LARGE_INTEGER tickPerSecond; LARGE_INTEGER tickPerSecond;
LARGE_INTEGER tick; LARGE_INTEGER tick;
time_t rawtime; struct _timeb timebuffer;
time(&rawtime); tzp = tzp;
_ftime(&timebuffer);
QueryPerformanceFrequency(&tickPerSecond); QueryPerformanceFrequency(&tickPerSecond);
QueryPerformanceCounter(&tick); QueryPerformanceCounter(&tick);
tv->tv_usec = (tick.QuadPart % tickPerSecond.QuadPart); tp->tv_usec = (tick.QuadPart % tickPerSecond.QuadPart);
tp->tv_sec = (long)rawtime; tp->tv_sec = timebuffer.time;
return 0; return 0;
} }
#elif 0 #elif 1
int gettimeofday( int gettimeofday(
struct timeval *tp, struct timeval *tp,
void *tzp) void *tzp)