From 8ab5a2d6bb9c8b6fbecf13750ee09c787e98d405 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 13 Aug 2019 09:52:42 +0200 Subject: [PATCH] Use GetSystemTimeAsFileTime to emulate GetTickCount64 --- winpr/libwinpr/sysinfo/sysinfo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/winpr/libwinpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c index 33f25340c..3f984f7fe 100644 --- a/winpr/libwinpr/sysinfo/sysinfo.c +++ b/winpr/libwinpr/sysinfo/sysinfo.c @@ -529,7 +529,12 @@ ULONGLONG winpr_GetTickCount64(void) ticks = (ts.tv_sec * 1000) + (ts.tv_nsec / 1000000); #elif defined(_WIN32) - ticks = (ULONGLONG) GetTickCount(); + FILETIME ft; + ULARGE_INTEGER ul; + GetSystemTimeAsFileTime(&ft); + ul.LowPart = ft.dwLowDateTime; + ul.HighPart = ft.dwHighDateTime; + ticks = ul.QuadPart; #else /** * FIXME: this is relative to the Epoch time, and we