Skip to content

Commit

Permalink
pythongh-103417: Fix the scheduler example (pythonGH-111497)
Browse files Browse the repository at this point in the history
Arguments to enterabs() are specified as Unix time.
If the scheduler use the time.monotonic timer, the code will take
decades to complete.
  • Loading branch information
mauricelambert authored and woodruffw committed Mar 4, 2024
1 parent ee6aec0 commit 361f52b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/sched.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
...
Expand Down

0 comments on commit 361f52b

Please sign in to comment.