[Python-Dev] this is why we shouldn't call it a "monotonic clock" (was: PEP 418 is too divisive and confusing and should be postponed)
victor.stinner at gmail.com
Mon Apr 9 13:26:30 CEST 2012
> | * time.process_time(): High-resolution (?) per-process timer from the
> | CPU. (other possible names: time.process_cpu_time() or
> | time.cpu_time())
> POSIX offers CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID that
> seem to suit this need, depending on your threading situation (and what
> you're measuring).
> | On Windows, GetProcessTimes() has not a "high-resolution": it has a
> | accuracy of 1 ms in the best case.
> This page:
> says "100-nanosecond time units".
> Am I going to the wrong place to learn about these functions?
Yes, the resolution is 100 ns, but the accuracy is only 1 ms in the
best case (but it usually 15 ms or 10 ms).
Resolution != accuracy, and only accuracy matters :-)
More information about the Python-Dev