[Bug 19963] New: GetSystemTimeAdjustment() should return 10000000 / sysconf(_SC_CLK_TCK)
http://bugs.winehq.org/show_bug.cgi?id=19963 Summary: GetSystemTimeAdjustment() should return 10000000 / sysconf(_SC_CLK_TCK) Product: Wine Version: 1.1.29 Platform: PC URL: http://rh-software.com/ OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs(a)winehq.org ReportedBy: ray(a)pobox.co.uk CC: ray(a)pobox.co.uk Currently there is now way to get the clock tick rate. GetSystemTimeAdjustment() should return this. The fix is trivial and shown below. Just because TimeAdjustmentDisabled is TRUE failing to return the current asjustment I beleive to be an error. Change to code to be: BOOL WINAPI GetSystemTimeAdjustment( PDWORD lpTimeAdjustment, PDWORD lpTimeIncrement, PBOOL lpTimeAdjustmentDisabled ) { *lpTimeAdjustment = 0; *lpTimeIncrement = 10000000 / sysconf(_SC_CLK_TCK); *lpTimeAdjustmentDisabled = TRUE; return TRUE; } -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 --- Comment #1 from Austin English <austinenglish(a)gmail.com> 2009-09-06 18:15:37 --- Please send patches to wine-patches(a)winehq.org. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Alias|red-ray | --- Comment #2 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2009-09-06 19:36:45 --- Except you assuming that kernel by default has 10000000 ticks per second. Which is not true on all systems. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 --- Comment #3 from red-ray <ray(a)pobox.co.uk> 2009-09-07 08:39:38 --- (In reply to comment #2)
Except you assuming that kernel by default has 10000000 ticks per second. Which is not true on all systems.
No, if you look at http://msdn.microsoft.com/en-us/library/ms724394(VS.85).aspx you will see it says: lpTimeIncrement [out] A pointer to a variable that the function sets to the interval between periodic time adjustments, in 100-nanosecond units. This interval is the time period between a system's clock interrupts. The 10000000 is nothing to do with the system ticks per second which is in fact returned by the sysconf(_SC_CLK_TCK) Further Wine already uses the 10000000 constant when returning thread CPU times. The code is at WINE-1.1.29\dlls\ntdll\thread.c around line 1013 you will find. long clocks_per_sec = sysconf(_SC_CLK_TCK); times(&time_buf); kusrt.KernelTime.QuadPart = (ULONGLONG)time_buf.tms_stime * 10000000 / clocks_per_sec; kusrt.UserTime.QuadPart = (ULONGLONG)time_buf.tms_utime * 10000000 / clocks_per_sec; -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 --- Comment #4 from Austin English <austinenglish(a)gmail.com> 2009-09-07 17:39:51 --- Ray sent me a copy of the software. Confirming. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 --- Comment #5 from Juan Lang <juan_lang(a)yahoo.com> 2009-09-30 15:12:52 --- I didn't see a patch from Ray, so I went ahead and sent one: http://www.winehq.org/pipermail/wine-patches/2009-September/079207.html -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 --- Comment #6 from ray(a)pobox.co.uk 2009-09-30 17:26:34 --- (In reply to comment #5)
I didn't see a patch from Ray, so I went ahead and sent one: http://www.winehq.org/pipermail/wine-patches/2009-September/079207.html
Thank you. I don't know how to generate patches ! -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 --- Comment #7 from Austin English <austinenglish(a)gmail.com> 2009-09-30 17:30:59 --- (In reply to comment #6)
(In reply to comment #5)
I didn't see a patch from Ray, so I went ahead and sent one: http://www.winehq.org/pipermail/wine-patches/2009-September/079207.html
Thank you. I don't know how to generate patches !
http://wiki.winehq.org/SubmittingPatches -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dank(a)kegel.com --- Comment #8 from Dan Kegel <dank(a)kegel.com> 2009-09-30 20:33:31 --- Juan sent a patch: http://www.winehq.org/pipermail/wine-patches/2009-September/079207.html -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 Juan Lang <juan_lang(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #9 from Juan Lang <juan_lang(a)yahoo.com> 2009-10-01 11:49:55 --- Fixed by commit 6614323807778b5ffede2498b1bee841a7eb4fa5, http://www.winehq.org/pipermail/wine-cvs/2009-October/059954.html -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 ray(a)pobox.co.uk changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from ray(a)pobox.co.uk 2009-10-01 14:33:52 --- Yes, it's fixed. Thankyou. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |RESOLVED --- Comment #11 from Nikolay Sivov <bunglehead(a)gmail.com> 2009-10-01 14:35:07 --- Will be closed with next release. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=19963 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #12 from Alexandre Julliard <julliard(a)winehq.org> 2009-10-09 11:14:22 --- Closing bugs fixed in 1.1.31. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
participants (1)
-
wine-bugs@winehq.org