Message349763
> 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 |
|
Date |
User |
Action |
Args |
2019-08-14 21:54:45 | vstinner | set | recipients:
+ vstinner, paul.moore, tim.golden, zach.ware, eryksun, steve.dower, Red Glyph |
2019-08-14 21:54:45 | vstinner | set | messageid: <1565819685.05.0.341518261044.issue37859@roundup.psfhosted.org> |
2019-08-14 21:54:45 | vstinner | link | issue37859 messages |
2019-08-14 21:54:44 | vstinner | create | |
|