https://github.com/python/cpython/commit/6324d9b485dac8a71cc51f43085f52e6bda3a5dd
commit: 6324d9b485dac8a71cc51f43085f52e6bda3a5dd
branch: 3.11
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-02-25T14:04:47+02:00
summary:

[3.11] gh-103417: Fix the scheduler example (GH-111497) (GH-115909)

Arguments to enterabs() are specified as Unix time.
If the scheduler use the time.monotonic timer, the code will take
decades to complete.
(cherry picked from commit cb287d342139509e03a2dbe5ea2608627fd3a350)

Co-authored-by: mauricelambert 
<[email protected]>

files:
M Doc/library/sched.rst

diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst
index 01bac5afd0b9b3..4c980dd97f9394 100644
--- a/Doc/library/sched.rst
+++ b/Doc/library/sched.rst
@@ -36,7 +36,7 @@ scheduler:
 Example::
 
    >>> import sched, time
-   >>> s = sched.scheduler(time.monotonic, time.sleep)
+   >>> s = sched.scheduler(time.time, time.sleep)
    >>> def print_time(a='default'):
    ...     print("From print_time", time.time(), a)
    ...

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to