summaryrefslogtreecommitdiff
path: root/cmake/msvc/sys/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/msvc/sys/time.h')
-rw-r--r--cmake/msvc/sys/time.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmake/msvc/sys/time.h b/cmake/msvc/sys/time.h
index 998b5d7bb..8800ed5cb 100644
--- a/cmake/msvc/sys/time.h
+++ b/cmake/msvc/sys/time.h
@@ -26,32 +26,32 @@ long tv_nsec; /* Additional nanoseconds since */
};
-struct timezone
+struct timezone
{
int tz_minuteswest; /* minutes W of Greenwich */
int tz_dsttime; /* type of dst correction */
};
-
+
static inline int gettimeofday(struct timeval *tv, struct timezone *tz)
{
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
-
+
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
-
+
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
-
+
/*converting file time to unix epoch*/
- tmpres -= DELTA_EPOCH_IN_MICROSECS;
+ tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
-
+
if (NULL != tz)
{
if (!tzflag)
@@ -62,7 +62,7 @@ static inline int gettimeofday(struct timeval *tv, struct timezone *tz)
tz->tz_minuteswest = _timezone / 60;
tz->tz_dsttime = _daylight;
}
-
+
return 0;
}