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

> (On which note: Please don't switch macOS to use 
> clock_gettime(CLOCK_MONOTONIC); that would be a breaking change for us!)

Right, I propose to add new clock(s) since people may rely on the current 
clock(s) specifications.

> At least Linux, macOS, FreeBSD, and Windows all have a way to access a 
> monotonic clock that stops ticking while the system is suspended.

Python also tries to support AIX, OpenBSD, Solaris, Android, etc.
https://pythondev.readthedocs.io/platforms.html#best-effort-and-unofficial-platforms

I'm not sure that all "supported" platforms provide such clock. It's ok if such 
clock is not available on all platforms. People can fallback on 
monotonic/perf_counter depending on their need. For example, previously, it was 
common to write something like:

try: from time import monotonic
except ImportError: from time import time as monotonic # Python 2 or clock not 
available

----------

_______________________________________
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