[issue37859] time.process_time() constant / erratic on Windows
STINNER Victor
report at bugs.python.org
Wed Aug 14 17:49:29 EDT 2019
STINNER Victor <vstinner at redhat.com> added the comment:
> Process times [1] are stored as a 64-bit integer in units of 100 ns (1e-7). But the kernel schedules threads based on a timer that ticks every 15.625 ms by default. It can be lowered to about 0.5 ms, but this degrades battery life.
Patches are welcome to enhance time.get_clock_info() :-)
Don't rely too much on time.get_clock_info() on Linux neither: it basically always say 1 ns, even if the effective resolution is way worse.
See the PEP 418 for some numbers:
https://www.python.org/dev/peps/pep-0418/#process-time
I wrote these programs to write this PEP ;-)
https://github.com/python/peps/tree/master/pep-0418
----------
nosy: +vstinner
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37859>
_______________________________________
More information about the Python-bugs-list
mailing list