diff options
author | Victor Stinner <vstinner@python.org> | 2020-11-16 12:21:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-16 12:21:45 (GMT) |
commit | 3df5c68487df9d1d20ab0cd06e7942a4f96d40a4 (patch) | |
tree | b62821ad59b1e84f207d962d593bcb2ca73cf588 /Misc/NEWS.d | |
parent | aa01011003bb855cd52abfd49f2443446590d913 (diff) | |
download | cpython-3df5c68487df9d1d20ab0cd06e7942a4f96d40a4.zip cpython-3df5c68487df9d1d20ab0cd06e7942a4f96d40a4.tar.gz cpython-3df5c68487df9d1d20ab0cd06e7942a4f96d40a4.tar.bz2 |
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.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2020-11-14-14-34-32.bpo-37205.iDbHrw.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2020-11-14-14-34-32.bpo-37205.iDbHrw.rst b/Misc/NEWS.d/next/Library/2020-11-14-14-34-32.bpo-37205.iDbHrw.rst new file mode 100644 index 0000000..5cf325e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-14-14-34-32.bpo-37205.iDbHrw.rst @@ -0,0 +1,5 @@ +:func:`time.perf_counter()` on Windows and :func:`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 +:func:`time.perf_counter_ns()` and :func:`time.monotonic_ns()` added in Python +3.7 to avoid this precision loss. |