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 belopolsky, jab, ned.deily, njs, nooB, p-ganssle, ronaldoussoren, vstinner, xrisk
Date 2020-08-05.14:59:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596639581.5.0.537057298179.issue41303@roundup.psfhosted.org>
In-reply-to
Content
> (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
History
Date User Action Args
2020-08-05 14:59:41vstinnersetrecipients: + vstinner, ronaldoussoren, belopolsky, ned.deily, njs, jab, nooB, p-ganssle, xrisk
2020-08-05 14:59:41vstinnersetmessageid: <1596639581.5.0.537057298179.issue41303@roundup.psfhosted.org>
2020-08-05 14:59:41vstinnerlinkissue41303 messages
2020-08-05 14:59:41vstinnercreate