summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-03-09 07:19:33 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-03-09 07:19:33 (GMT)
commitc75be9341d1bb557fb8a5beb04624451bc28c18b (patch)
tree1f3b8bc90e6438794a3011c410c22fff029d19b7
parenta28c55a2e484ea81b4f659f987893be3638cb982 (diff)
parentadecf3f66f0033782f89047ca9357e672403d548 (diff)
downloadcpython-c75be9341d1bb557fb8a5beb04624451bc28c18b.zip
cpython-c75be9341d1bb557fb8a5beb04624451bc28c18b.tar.gz
cpython-c75be9341d1bb557fb8a5beb04624451bc28c18b.tar.bz2
Merge: closes issue 16643 (not ....2 as in last commit message)
-rw-r--r--Doc/library/sched.rst5
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS3
3 files changed, 7 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
diff --git a/Misc/ACKS b/Misc/ACKS
index 9469f16..8c4cf87 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -44,6 +44,7 @@ Jérémy Anger
Ankur Ankan
Jon Anglin
Heidi Annexstad
+Ramchandra Apte
Éric Araujo
Alicia Arlen
Jeffrey Armstrong
diff --git a/Misc/NEWS b/Misc/NEWS
index 17282af..42f87f8 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1078,6 +1078,9 @@ Build
Documentation
-------------
+- Issue #16642: sched.scheduler timefunc initial default is time.monotonic.
+ Patch by Ramchandra Apte
+
- Issue #15465: Document the versioning macros in the C API docs rather than
the standard library docs. Patch by Kushal Das.