DEFINE_SYSCALL(gettimeofday, struct timeval *, tv, struct timezone *, tz) { log_info("gettimeofday(0x%p, 0x%p)", tv, tz); if (tz) log_error("warning: timezone is not NULL"); if (tv) { FILETIME system_time; win7compat_GetSystemTimePreciseAsFileTime(&system_time); filetime_to_unix_timeval(&system_time, tv); } return 0; }
DEFINE_SYSCALL(gettimeofday, struct timeval *, tv, struct timezone *, tz) { log_info("gettimeofday(0x%p, 0x%p)\n", tv, tz); if (tz) log_error("warning: timezone is not NULL\n"); if (tv) { /* TODO: Use GetSystemTimePreciseAsFileTime() on Windows 8 */ FILETIME system_time; GetSystemTimeAsFileTime(&system_time); filetime_to_unix_timeval(&system_time, tv); } return 0; }