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:
mauricelambert 2024-02-25 11:55:57 +00:00 committed by GitHub
parent 6550b54813
commit cb287d3421
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
...