bpo-21302: Add nanosleep() implementation for time.sleep() in Unix (GH-28545)

Co-authored-by: Livius <egyszeregy@freemail.hu>
This commit is contained in:
Victor Stinner 2021-09-25 14:36:26 +02:00 committed by GitHub
parent 71f8ff45c6
commit 7834ff26cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 114 additions and 33 deletions

View file

@ -242,9 +242,10 @@ sqlite3
time
----
* On Unix, :func:`time.sleep` now uses the ``clock_nanosleep()`` function, if
available, which has a resolution of 1 ns (10^-6 sec), rather than using
``select()`` which has a resolution of 1 us (10^-9 sec).
* On Unix, :func:`time.sleep` now uses the ``clock_nanosleep()`` or
``nanosleep()`` function, if available, which has a resolution of 1 ns (10^-6
sec), rather than using ``select()`` which has a resolution of 1 us (10^-9
sec).
(Contributed by Livius and Victor Stinner in :issue:`21302`.)
* On Windows, :func:`time.sleep` now uses a waitable timer which has a