Module: wine
Branch: master
Commit: fa9a883dbbd49117c2e53f5b3ea8cd49397bf520
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa9a883dbbd49117c2e53f5b3…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Fri Jan 25 17:28:48 2013 +0100
kernel32: Use the monotonic counter in GetTickCount64.
---
dlls/kernel32/kernel_main.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c
index cf06765..2edfcbc 100644
--- a/dlls/kernel32/kernel_main.c
+++ b/dlls/kernel32/kernel_main.c
@@ -179,10 +179,10 @@ INT WINAPI MulDiv( INT nMultiplicand, INT nMultiplier, INT nDivisor)
*/
ULONGLONG WINAPI GetTickCount64(void)
{
- LARGE_INTEGER now;
+ LARGE_INTEGER counter, frequency;
- NtQuerySystemTime( &now );
- return (now.QuadPart - server_start_time) / 10000;
+ NtQueryPerformanceCounter( &counter, &frequency );
+ return counter.QuadPart * 1000 / frequency.QuadPart;
}
@@ -199,8 +199,6 @@ ULONGLONG WINAPI GetTickCount64(void)
*
* NOTES
* The value returned will wrap around every 2^32 milliseconds.
- * Under Windows, tick 0 is the moment at which the system is rebooted.
- * Under Wine, tick 0 begins at the moment the wineserver process is started.
*/
DWORD WINAPI GetTickCount(void)
{