summaryrefslogtreecommitdiff
path: root/src/os_win/os_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_win/os_time.c')
-rw-r--r--src/os_win/os_time.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/os_win/os_time.c b/src/os_win/os_time.c
index 6aa5b3719f6..ba71341ab22 100644
--- a/src/os_win/os_time.c
+++ b/src/os_win/os_time.c
@@ -15,17 +15,18 @@
void
__wt_epoch(WT_SESSION_IMPL *session, struct timespec *tsp)
{
+ struct timespec tmp;
FILETIME time;
uint64_t ns100;
- WT_UNUSED(session);
-
GetSystemTimeAsFileTime(&time);
ns100 = (((int64_t)time.dwHighDateTime << 32) + time.dwLowDateTime)
- 116444736000000000LL;
- tsp->tv_sec = ns100 / 10000000;
- tsp->tv_nsec = (long)((ns100 % 10000000) * 100);
+ tmp.tv_sec = ns100 / 10000000;
+ tmp.tv_nsec = (long)((ns100 % 10000000) * 100);
+ __wt_time_check_monotonic(session, &tmp);
+ *tsp = tmp;
}
/*