File tree Expand file tree Collapse file tree 3 files changed +4
-17
lines changed Expand file tree Collapse file tree 3 files changed +4
-17
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -621,9 +621,8 @@ Two new events are added: :monitoring-event:`BRANCH_LEFT` and
621621time
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
Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments