diff options
author | mauricelambert <50479118+mauricelambert@users.noreply.github.com> | 2024-02-25 11:55:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-25 11:55:57 (GMT) |
commit | cb287d342139509e03a2dbe5ea2608627fd3a350 (patch) | |
tree | dabf7719a651c67f18ceaf2e02e73c32c3eb4536 /Doc/library | |
parent | 6550b548138ed996e1098c4271f5b7df56f02ab8 (diff) | |
download | cpython-cb287d342139509e03a2dbe5ea2608627fd3a350.zip cpython-cb287d342139509e03a2dbe5ea2608627fd3a350.tar.gz cpython-cb287d342139509e03a2dbe5ea2608627fd3a350.tar.bz2 |
gh-103417: Fix the scheduler example (GH-111497)
Arguments to enterabs() are specified as Unix time.
If the scheduler use the time.monotonic timer, the code will take
decades to complete.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/sched.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst index 01bac5a..4c980dd 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) ... |