gh-103417: use time.monotonic in the example for sched.scheduler (GH-103418)

(cherry picked from commit f2b7ecb778)

Co-authored-by: Nick Burns <nburns@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2023-04-12 02:09:08 -07:00 committed by GitHub
parent b5fe28dace
commit e643412ef4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ scheduler:
Example:: Example::
>>> import sched, time >>> import sched, time
>>> s = sched.scheduler(time.time, time.sleep) >>> s = sched.scheduler(time.monotonic, 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)
... ...