Skip to content

Commit 153b326

Browse files
committed
update docs
1 parent 40155ff commit 153b326

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

Doc/library/time.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -397,18 +397,10 @@ Functions
397397

398398
.. rubric:: Unix implementation
399399

400-
If *secs* is zero, ``select()`` is used. Otherwise:
401-
402400
* Use ``clock_nanosleep()`` if available (resolution: 1 nanosecond);
403401
* Or use ``nanosleep()`` if available (resolution: 1 nanosecond);
404402
* Or use ``select()`` (resolution: 1 microsecond).
405403

406-
.. note::
407-
408-
To voluntarily relinquish the CPU, specify a read-time :ref:`scheduling
409-
policy <os-scheduling-policy>` (see :manpage:`sched_yield(2)`) and use
410-
:func:`os.sched_yield` instead.
411-
412404
.. audit-event:: time.sleep secs
413405

414406
.. versionchanged:: 3.5
@@ -423,10 +415,6 @@ Functions
423415
.. versionchanged:: 3.13
424416
Raises an auditing event.
425417

426-
.. versionchanged:: next
427-
On Unix, ``time.sleep(0)`` always uses ``select()``, even if the
428-
``clock_nanosleep()`` or ``nanosleep()`` functions are available.
429-
430418
.. index::
431419
single: % (percent); datetime format
432420

Doc/whatsnew/3.14.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,8 @@ Two new events are added: :monitoring-event:`BRANCH_LEFT` and
621621
time
622622
----
623623

624-
* Ensure that :func:`time.sleep(0) <time.sleep>` does not accumulate delays on
625-
POSIX platforms. The implementation always uses :manpage:`select(2)` even if
626-
the :manpage:`clock_nanosleep` or :manpage:`nanosleep` functions are present.
624+
* Ensure that :func:`time.sleep(0) <time.sleep>` does not degrade over time
625+
on non-Windows platforms.
627626
(Contributed by Bénédikt Tran in :gh:`125997`.)
628627

629628

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Ensure that :func:`time.sleep(0) <time.sleep>` does not accumulate delays on
2-
non-Windows platforms. Patch by Bénédikt Tran.
1+
Ensure that :func:`time.sleep(0) <time.sleep>` does not degrade over time
2+
on non-Windows platforms. Patch by Bénédikt Tran.

0 commit comments

Comments
 (0)