]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-21302: time.sleep() uses waitable timer on Windows (GH-28483)
authorVictor Stinner <vstinner@python.org>
Wed, 22 Sep 2021 14:09:30 +0000 (16:09 +0200)
committerGitHub <noreply@github.com>
Wed, 22 Sep 2021 14:09:30 +0000 (16:09 +0200)
commit58f8adfda3c2b42f654a55500e8e3a6433cb95f2
tree2804e1290e728fe7f5aa6ba46215b894de3f88ea
parent8620be99da930230b18ec05f4d7446ee403531af
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>
Doc/library/time.rst
Doc/whatsnew/3.11.rst
Include/cpython/pytime.h
Misc/NEWS.d/next/Library/2021-09-20-22-46-40.bpo-21302.h56430.rst [new file with mode: 0644]
Modules/timemodule.c
Python/pytime.c