void
xgettimeofday(struct timeval *tv)
{
+#ifndef _WIN32
if (gettimeofday(tv, NULL) == -1) {
VLOG_FATAL("gettimeofday failed (%s)", ovs_strerror(errno));
}
+#else
+ ULARGE_INTEGER current_time = xgetfiletime();
+
+ tv->tv_sec = (current_time.QuadPart - unix_epoch.QuadPart) / 10000000;
+ tv->tv_usec = ((current_time.QuadPart - unix_epoch.QuadPart) %
+ 10000000) / 10;
+#endif
}
void