[Bug 53005] New: quartz:systemclock Fails after timeGetTime() wraps
WineHQ Bugzilla
wine-bugs at winehq.org
Sat May 14 10:07:55 CDT 2022
https://bugs.winehq.org/show_bug.cgi?id=53005
Bug ID: 53005
Summary: quartz:systemclock Fails after timeGetTime() wraps
Product: Wine
Version: unspecified
Hardware: x86-64
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: quartz
Assignee: wine-bugs at winehq.org
Reporter: fgouget at codeweavers.com
Distribution: ---
Created attachment 72373
--> https://bugs.winehq.org/attachment.cgi?id=72373
Use GetTickCount64() instead of timeGetTime() in quartz:systemclock
quartz:systemclock fails on fg-deb64:
systemclock.c:186: Test failed: Got timestamps 43062836670000, 113163710000,
43062836670000.
https://test.winehq.org/data/patterns.html#quartz:systemclock
The issue is that timeGetTime() wrapped after 49.71 days (2^32 milliseconds) of
uptime, causing it to no longer match the values returned by
IReferenceClock_GetTime().
The test started using timeGetTime() in the commit below:
commit bf5b35f19b841e6352c32ca7c6671d9172636871
Author: Zebediah Figura <zfigura at codeweavers.com>
AuthorDate: Thu Oct 21 12:41:11 2021 -0500
quartz: Use the performance counter for the system clock.
Native probably uses timeGetTime() as a source. That doesn't actually match
the
performance counter on Windows, but it does on Wine, and accessing the
counter
directly is slightly more efficient anyway.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51684
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
The commit made two changes:
GetTickCount*() -> timeGetTime() in the test
GetTickCount64() -> QueryPerformanceCounter() in SystemClockImpl_GetTime()
Before this commit the test was failing on Windows because the GetTickCount*()
values and SystemClockImpl_GetTime() were a bit out of sync. So while switching
to GetTickCount64() in the test fixes the issue in Wine and does not seem to
cause failures on Windows it's not clear that this is correct either.
It would also be nice to see what happens to this test on Windows after 49.7
days of uptime.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list