[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-02-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3965ed809a85 by Victor Stinner in branch 'default': Issue #13845: Fix NEWS entry, the change is specific to Windows http://hg.python.org/cpython/rev/3965ed809a85 -- ___ Python tracker

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-02-08 Thread Éric Araujo
Éric Araujo added the comment: Please make sure to say “on Windows” in NEWS and commit messages when you’re doing platform-specific changes :) -- nosy: +eric.araujo ___ Python tracker

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-02-07 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-02-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset bee7943d38c6 by Victor Stinner in branch 'default': Issue #13845: time.time() now uses GetSystemTimeAsFileTime() instead of ftime() http://hg.python.org/cpython/rev/bee7943d38c6 -- nosy: +python-dev ___

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-31 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24306/timespec-2.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-29 Thread STINNER Victor
STINNER Victor added the comment: Two articles (Microsoft and IBM) about high resolution time on Windows: http://msdn.microsoft.com/en-us/magazine/cc163996.aspx http://www.ibm.com/developerworks/library/i-seconds/ I installed the Windows port of the NTP daemon: http://www.meinberg.de/english/sw

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-26 Thread STINNER Victor
STINNER Victor added the comment: Using the patch of #13882, I realize that time.time() has a resolution of 1 millisecond (10^-3) and not of a microsecond (10^-6) on Windows! Windows doesn't provide gettimeofday(). Using GetSystemTimeAsFileTime() would provide a much better resolution! -

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread STINNER Victor
STINNER Victor added the comment: > NtSetTimerResolution is a system-wide change, and may have impact on other > running applications.  It may be an option to set it during the execution of > profile.run() for example, but I would not enable it just to call > time.clock(). I was not proposin

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: NtSetTimerResolution is a system-wide change, and may have impact on other running applications. It may be an option to set it during the execution of profile.run() for example, but I would not enable it just to call time.clock(). -- _

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread STINNER Victor
STINNER Victor added the comment: > GetSystemTimeAsFileTime() represent durations as multiple of 100ns, > unfortunately its value is only updated every 15ms or so.  Precision is not > accuracy... It is possible to improve the accuracy of this clock using the undocumented NtSetTimerResolution(

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: GetSystemTimeAsFileTime() represent durations as multiple of 100ns, unfortunately its value is only updated every 15ms or so. Precision is not accuracy... -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread STINNER Victor
STINNER Victor added the comment: See also #11457 for discussion on nanosecond resolution and a potential new type to avoid loose of resolution of the Python float type (IEEE binary64). -- ___ Python tracker

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24305/timespec.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread STINNER Victor
STINNER Victor added the comment: Oops, my first patch contains an unrelated change for Windows. New patch fixes this bug, and change time_clock() to reuse time_time() if time_clock() fails to get the CPU frequency (unlikely) because it has a better resolution than clock(). -- Added

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread STINNER Victor
New submission from STINNER Victor : Python implements time.time() using gettimeofday() which has only a resolution of 1 microsecond because it uses the timeval structure which is only able to store microseconds. Attached patch changes _PyTime_gettimeofday() to make it uses the timespec struc