6 #define TICKS_PER_SECOND (10000000)
7 #define TICKS_PER_MICROSECOND (10)
8 #define TICKS_UNIX_EPOCH (116444736000000000LL)
10 int win32GetTimeOfDay(
18 unused_parameter(tzp
);
19 memset(&fileTime
, 0, sizeof(FILETIME
));
20 GetSystemTimeAsFileTime(&fileTime
);
21 ticks
= (ULONGLONG
)fileTime
.dwHighDateTime
<< 32;
22 ticks
|= (ULONGLONG
)fileTime
.dwLowDateTime
;
23 unixTicks
= ticks
- TICKS_UNIX_EPOCH
;
24 tp
->tv_sec
= (long)(unixTicks
/ TICKS_PER_SECOND
);
25 unixTicks
-= ((ULONGLONG
)tp
->tv_sec
* TICKS_PER_SECOND
);
26 tp
->tv_usec
= (long)(unixTicks
/ TICKS_PER_MICROSECOND
);