diff options
author | Victor Stinner <vstinner@python.org> | 2021-09-22 14:09:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-22 14:09:30 (GMT) |
commit | 58f8adfda3c2b42f654a55500e8e3a6433cb95f2 (patch) | |
tree | 2804e1290e728fe7f5aa6ba46215b894de3f88ea /Misc/NEWS.d/next/Library/2021-09-20-22-46-40.bpo-21302.h56430.rst | |
parent | 8620be99da930230b18ec05f4d7446ee403531af (diff) | |
download | cpython-58f8adfda3c2b42f654a55500e8e3a6433cb95f2.zip cpython-58f8adfda3c2b42f654a55500e8e3a6433cb95f2.tar.gz cpython-58f8adfda3c2b42f654a55500e8e3a6433cb95f2.tar.bz2 |
bpo-21302: time.sleep() uses waitable timer on Windows (GH-28483)
On Windows, time.sleep() now uses a waitable timer which has a
resolution of 100 ns (10^-7 sec). Previously, it had a solution of 1
ms (10^-3 sec).
* On Windows, time.sleep() now calls PyErr_CheckSignals() before
resetting the SIGINT event.
* Add _PyTime_As100Nanoseconds() function.
* Complete and update time.sleep() documentation.
Co-authored-by: Livius <egyszeregy@freemail.hu>
Diffstat (limited to 'Misc/NEWS.d/next/Library/2021-09-20-22-46-40.bpo-21302.h56430.rst')
-rw-r--r-- | Misc/NEWS.d/next/Library/2021-09-20-22-46-40.bpo-21302.h56430.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-09-20-22-46-40.bpo-21302.h56430.rst b/Misc/NEWS.d/next/Library/2021-09-20-22-46-40.bpo-21302.h56430.rst new file mode 100644 index 0000000..22011b7 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-09-20-22-46-40.bpo-21302.h56430.rst @@ -0,0 +1,3 @@ +On Windows, :func:`time.sleep` now uses a waitable timer which has a resolution +of 100 ns (10^-7 sec). Previously, it had a solution of 1 ms (10^-3 sec). +Patch by Livius and Victor Stinner. |