Message374888
> (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 |
|
Date |
User |
Action |
Args |
2020-08-05 14:59:41 | vstinner | set | recipients:
+ vstinner, ronaldoussoren, belopolsky, ned.deily, njs, jab, nooB, p-ganssle, xrisk |
2020-08-05 14:59:41 | vstinner | set | messageid: <1596639581.5.0.537057298179.issue41303@roundup.psfhosted.org> |
2020-08-05 14:59:41 | vstinner | link | issue41303 messages |
2020-08-05 14:59:41 | vstinner | create | |
|