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 Red Glyph, eryksun, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2019-08-14.21:54:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565819685.05.0.341518261044.issue37859@roundup.psfhosted.org>
In-reply-to
Content
> I see that now. The behaviour was different in Linux, though, I suppose it may benefit from a more precise counter, but since in Windows it also has a precise counter with time.perf_counter_ns(), I was expecting to see that value change, but it was mainly a confusion with the older time.clock().

On Windows, time.clock() was implemented with QueryPerformanceCounter(). This function became time.perf_counter() in Python 3.4. time.clock() was removed. Use time.get_clock_info('perf_counter') ;-)

The PEP 418 introduces new well defined clocks, since time.clock() was not portable.

perf_counter and process_time have very different properties. process_time is stopped when the process sleeps, for example.

https://docs.python.org/dev/library/time.html#time.perf_counter
https://docs.python.org/dev/library/time.html#time.process_time
History
Date User Action Args
2019-08-14 21:54:45vstinnersetrecipients: + vstinner, paul.moore, tim.golden, zach.ware, eryksun, steve.dower, Red Glyph
2019-08-14 21:54:45vstinnersetmessageid: <1565819685.05.0.341518261044.issue37859@roundup.psfhosted.org>
2019-08-14 21:54:45vstinnerlinkissue37859 messages
2019-08-14 21:54:44vstinnercreate