[Python-checkins] gh-103417: use time.monotonic in the example for sched.scheduler (#103418)

hauntsaninja webhook-mailer at python.org
Wed Apr 12 04:59:29 EDT 2023


https://github.com/python/cpython/commit/f2b7ecb7783299c4555e89125ca9ba8e89854643
commit: f2b7ecb7783299c4555e89125ca9ba8e89854643
branch: main
author: Nick Burns <nburns at users.noreply.github.com>
committer: hauntsaninja <12621235+hauntsaninja at users.noreply.github.com>
date: 2023-04-12T01:59:21-07:00
summary:

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

files:
M Doc/library/sched.rst

diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst
index a051c65b97b0..04215d31ba10 100644
--- a/Doc/library/sched.rst
+++ b/Doc/library/sched.rst
@@ -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)
    ...



More information about the Python-checkins mailing list