This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gvanrossum, neologix, python-dev, vstinner
Date 2014-02-10.22:01:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> How do you know that the timer used by the select/poll/etc. call has the same resolution?

If I understood correctly, there a 3 kind of clocks on Windows:

- kernel heartbeat: GetSystemTimeAdjustment() gives the resolution (a few milliseconds)
- multimedia timers
- performance counter: the resolution is 1 / QueryPerformanceFrequency() (at least 1 microsecond)

GetSystemTimeAsFileTime() (time.time), GetTickCount[64]() (time.monotonic) and GetProcessTimes() (time.process_time) use the kernel heartbeat (I invented this name :-)). GetTickCount() is not adjusted.

QueryPerformanceCounter() is the performance counter, it is used by time.perf_counter().


For more information, see the PEP 418:

> Can the clock resolution be zero?

There is a unit test to ensure that the resolution of all clocks is greater than 0 and smaller or equal than 1.0.

> If not, I recommend adjusting the comparisons so that an event scheduled at exactly the rounded-up 'now' value is not considered ready -- it should be strictly before.

Ok, here is an updated patch.
Date User Action Args
2014-02-10 22:01:46vstinnersetrecipients: + vstinner, gvanrossum, neologix, python-dev
2014-02-10 22:01:45vstinnersetmessageid: <>
2014-02-10 22:01:45vstinnerlinkissue20505 messages
2014-02-10 22:01:45vstinnercreate