STINNER Victor <[email protected]> added the comment:
> 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
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37859>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com