[issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation
New submission from Ken Healy
Ken Healy
Change by Terry J. Reedy
Ken Healy
Mariatta Wijaya
can you explain why you removed 3.5 and 3.6 from the versions list?
3.5 and 3.6 are closed for regular bug fix maintenance. We're only fixing issues in 3.7 and 3.8 now.
Only security fixes will be applied to 3.5 or 3.6, and this issue is not considered a security issue.
More details in https://devguide.python.org/#status-of-python-branches
----------
nosy: +Mariatta
_______________________________________
Python tracker
Daniel Hrisca
STINNER Victor
Daniel Hrisca
Eryk Sun
suggest to use time.perf_counter_ns() instead of time.perf_counter() for best precision.
QPC typically has a frequency of 1e7, which requires 24 bits for the fraction of a second. So a system can be up for years before the 53-bit precision of a float is an issue. What am I missing?
----------
nosy: +eryksun
_______________________________________
Python tracker
Eryk Sun
QPC typically has a frequency of 1e7,
Never mind. Apparently with some combinations of chipset, processor, and Windows version, the QPC frequency runs far beyond the 1-10 MHz range. I thought Windows divided by 1024 instead of letting it run in the GHz range, but apparently not from what I see in search results. I misread "*in many cases*, QueryPerformanceFrequency returns the TSC frequency divided by 1024".
----------
_______________________________________
Python tracker
Daniel Hrisca
Change by STINNER Victor
STINNER Victor
STINNER Victor
Change by STINNER Victor
STINNER Victor
STINNER Victor
Change by Eryk Sun
Change by Eryk Sun
participants (6)
-
Daniel Hrisca
-
Eryk Sun
-
Ken Healy
-
Mariatta Wijaya
-
STINNER Victor
-
Terry J. Reedy