39 int gettimeofday (
struct timeval *tv,
struct timezone *tz) {
41 unsigned __int64 tmpres = 0;
45 GetSystemTimeAsFileTime(&ft);
47 tmpres |= ft.dwHighDateTime;
49 tmpres |= ft.dwLowDateTime;
52 tmpres -= 11644473600000000ULL;
54 tv->tv_sec = (long)(tmpres / 1000000UL);
55 tv->tv_usec = (long)(tmpres % 1000000UL);
63 tz->tz_minuteswest = _timezone / 60;
64 tz->tz_dsttime = _daylight;
86 tm.tv_usec = (long)1000*ms;
90 select(0, 0, 0, 0, &tm);