mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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.
This commit is contained in:
parent
6550b54813
commit
cb287d3421
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue