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:
@@ -36,7 +36,7 @@ scheduler:
|
|||||||
Example::
|
Example::
|
||||||
|
|
||||||
>>> import sched, time
|
>>> import sched, time
|
||||||
>>> s = sched.scheduler(time.monotonic, time.sleep)
|
>>> s = sched.scheduler(time.time, time.sleep)
|
||||||
>>> def print_time(a='default'):
|
>>> def print_time(a='default'):
|
||||||
... print("From print_time", time.time(), a)
|
... print("From print_time", time.time(), a)
|
||||||
...
|
...
|
||||||
|
|||||||
Reference in New Issue
Block a user