]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-103417: use time.monotonic in the example for sched.scheduler (#103418)
authorNick Burns <nburns@users.noreply.github.com>
Wed, 12 Apr 2023 08:59:21 +0000 (01:59 -0700)
committerGitHub <noreply@github.com>
Wed, 12 Apr 2023 08:59:21 +0000 (01:59 -0700)
Doc/library/sched.rst

index a051c65b97b05ee94411f46f7cc455a1cdbc3c09..04215d31ba10ca004899c1db3270b4fff276c25e 100644 (file)
@@ -36,7 +36,7 @@ scheduler:
 Example::
 
    >>> import sched, time
-   >>> s = sched.scheduler(time.time, time.sleep)
+   >>> s = sched.scheduler(time.monotonic, time.sleep)
    >>> def print_time(a='default'):
    ...     print("From print_time", time.time(), a)
    ...