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