Message 206891 - Python tracker

Message206891

Author vstinner
Recipients christian.heimes, python-dev, tim.peters, vstinner, zach.ware
Date 2013-12-24.14:18:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387894706.31.0.787771083233.issue19999@psf.upfronthosting.co.za>
In-reply-to
Content
> "GetSystemTimeAdjustment is not the function to look at."

This sentence comes from http://stackoverflow.com/questions/7685762/windows-7-timing-functions-how-to-use-getsystemtimeadjustment-correctly which describes the wall clock (GetSystemTimeAsFileTime), not the monotonic clock (GetTickCount[64]).

GetTickCount[64] resolution cannot be better than 1 ms because its C structure has a resolution of 1 ms...

But I don't know any other *monotonic* clock with a better resolution.

Python 3.3 provides time.perf_counter(): "clock with the highest available resolution to measure a short duration". I added this function because of Windows, to give access to QueryPerformanceCounter().

@Tim: This issue is closed. If you believe that Python time functions are buggy on windows, which is quite possible, please open a *new* issue. (This issue was specific to OpenIndiana buildbot which looks to be ill.)

The C function pygettimeofday() which is used by time.time() and time.get_clock_info() uses GetSystemTimeAsFileTime() and GetSystemTimeAdjustment(). According to the article, there is a bug.
History
Date User Action Args
2013-12-24 14:18:26vstinnersetrecipients: + vstinner, tim.peters, christian.heimes, python-dev, zach.ware
2013-12-24 14:18:26vstinnersetmessageid: <1387894706.31.0.787771083233.issue19999@psf.upfronthosting.co.za>
2013-12-24 14:18:26vstinnerlinkissue19999 messages
2013-12-24 14:18:25vstinnercreate