summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authormauricelambert <50479118+mauricelambert@users.noreply.github.com>2024-02-25 11:55:57 (GMT)
committerGitHub <noreply@github.com>2024-02-25 11:55:57 (GMT)
commitcb287d342139509e03a2dbe5ea2608627fd3a350 (patch)
treedabf7719a651c67f18ceaf2e02e73c32c3eb4536 /Doc/library
parent6550b548138ed996e1098c4271f5b7df56f02ab8 (diff)
downloadcpython-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.rst2
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)
...