6 #define TICKS_PER_SECOND (10000000)
7 #define TICKS_PER_MICROSECOND (10)
8 #define TICKS_UNIX_EPOCH (116444736000000000LL)
10 int win32GetTimeOfDay(
15 ULARGE_INTEGER largeInteger
;
18 unused_parameter(tzp
);
19 memset(&fileTime
, 0, sizeof(FILETIME
));
20 GetSystemTimeAsFileTime(&fileTime
);
21 memset(&largeInteger
, 0, sizeof(ULARGE_INTEGER
));
22 largeInteger
.LowPart
= fileTime
.dwLowDateTime
;
23 largeInteger
.HighPart
= fileTime
.dwHighDateTime
;
24 temp
= largeInteger
.QuadPart
- TICKS_UNIX_EPOCH
;
25 tp
->tv_sec
= (long)(temp
/ TICKS_PER_SECOND
);
26 temp
-= ((ULONGLONG
)tp
->tv_sec
* TICKS_PER_SECOND
);
27 tp
->tv_usec
= (long)(temp
/ TICKS_PER_MICROSECOND
);