[3.12] gh-103417: Fix the scheduler example (GH-111497) (GH-115908)

Arguments to enterabs() are specified as Unix time.
If the scheduler use the time.monotonic timer, the code will take
decades to complete.
(cherry picked from commit cb287d3421)

Co-authored-by: mauricelambert <50479118+mauricelambert@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2024-02-25 13:04:32 +01:00 committed by GitHub
parent 116375eb04
commit f684e257b1
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)
...