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