Fixed compile error in module.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user