STINNER Victor <vstin...@python.org> added the comment:

> There is a clock with similar behaviour as the Linux clock: CLOCK_UPTIME_RAW

On Linux, CLOCK_UPTIME_RAW is not adjusted by NTP and it should not be used for 
a clock using *seconds*. NTP ensures that a clock provides seconds and is not 
slower or faster.

On macOS, if you want a clock which is incremented while the system is asleep, 
CLOCK_MONOTONIC sounds like a better choice.

I don't know if time.perf_counter() and CLOCK_MONOTONIC have similar effective 
resolution on macOS. time.perf_counter() should have a better resolution, but 
can have a worse accurary, than time.monotonic().

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41303>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to