summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-03-09 07:14:27 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-03-09 07:14:27 (GMT)
commitadecf3f66f0033782f89047ca9357e672403d548 (patch)
treeccabc5c47ea78e1f69168860607a1b9a3f03b76b /Doc
parentf96b2b03bbce6119b1993523a0dc2a9c020f0a90 (diff)
downloadcpython-adecf3f66f0033782f89047ca9357e672403d548.zip
cpython-adecf3f66f0033782f89047ca9357e672403d548.tar.gz
cpython-adecf3f66f0033782f89047ca9357e672403d548.tar.bz2
Issue #16642: sched.scheduler timefunc initial default is time.monotonic.
Patch by Ramchandra Apte
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/sched.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst
index cb5fe4f..f1a376f 100644
--- a/Doc/library/sched.rst
+++ b/Doc/library/sched.rst
@@ -14,12 +14,13 @@
The :mod:`sched` module defines a class which implements a general purpose event
scheduler:
-.. class:: scheduler(timefunc=time.time, delayfunc=time.sleep)
+.. class:: scheduler(timefunc=time.monotonic, delayfunc=time.sleep)
The :class:`scheduler` class defines a generic interface to scheduling events.
It needs two functions to actually deal with the "outside world" --- *timefunc*
should be callable without arguments, and return a number (the "time", in any
- units whatsoever). The *delayfunc* function should be callable with one
+ units whatsoever). If time.monotonic is not available, the *timefunc* default
+ is time.time instead. The *delayfunc* function should be callable with one
argument, compatible with the output of *timefunc*, and should delay that many
time units. *delayfunc* will also be called with the argument ``0`` after each
event is run to allow other threads an opportunity to run in multi-threaded