ntdll: Use the monotonic time counter also for timer queues.
Joerg-Cyril.Hoehle at t-systems.com
Joerg-Cyril.Hoehle at t-systems.com
Thu Feb 7 08:00:27 CST 2013
Hi,
Wine should not base periodic timers nor audio on a TOD clock that
is subject to DST and other time adjustments like NTP.
>now.QuadPart * 1000 / freq.QuadPart;
I don't like this X * numerator / denominator
business that transcends all timers that much.
In effect, it means that we loose a significant amount of bits
(depending on how large num. and den. are)
from the presumably soo large 64bit values.
That pattern is present in several places in Wine.
An opportunity for optimization would be
if (denominator = 10000000) /* short-circuit the known Wine value */
return now / 10000
else return now * num / den
I've tested this transition using the tests in ntdll, kernel, mmdevapi and winmm.
Regards,
Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ntdll-Use-the-monotonic-time-counter-also-for-timer.patch
Type: application/octet-stream
Size: 924 bytes
Desc: 0001-ntdll-Use-the-monotonic-time-counter-also-for-timer.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130207/a4359ef5/attachment.obj>
More information about the wine-patches
mailing list