]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-37205: time.perf_counter() and time.monotonic() are system-wide (GH-23284)
authorVictor Stinner <vstinner@python.org>
Mon, 16 Nov 2020 12:21:45 +0000 (13:21 +0100)
committerGitHub <noreply@github.com>
Mon, 16 Nov 2020 12:21:45 +0000 (13:21 +0100)
commit3df5c68487df9d1d20ab0cd06e7942a4f96d40a4
treeb62821ad59b1e84f207d962d593bcb2ca73cf588
parentaa01011003bb855cd52abfd49f2443446590d913
bpo-37205: time.perf_counter() and time.monotonic() are system-wide (GH-23284)

time.perf_counter() on Windows and time.monotonic() on macOS are now
system-wide. Previously, they used an offset computed at startup to
reduce the precision loss caused by the float type. Use
time.perf_counter_ns() and time.monotonic_ns() added in Python 3.7 to
avoid this precision loss.
Doc/library/time.rst
Misc/NEWS.d/next/Library/2020-11-14-14-34-32.bpo-37205.iDbHrw.rst [new file with mode: 0644]
Python/pytime.c