]> granicus.if.org Git - python/commitdiff
Issue #16642: sched.scheduler timefunc initial default is time.monotonic.
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 9 Mar 2013 07:14:27 +0000 (02:14 -0500)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sat, 9 Mar 2013 07:14:27 +0000 (02:14 -0500)
Patch by Ramchandra Apte

Doc/library/sched.rst
Misc/ACKS
Misc/NEWS

index cb5fe4f7d37e675b97165ef35b08a111c07f51b3..f1a376fc25024c9ce47816c7710be62436c9f7a7 100644 (file)
 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
index ea563eb97249711959aa3d0c330ebcd32d60ae68..0aa64b7ab71843b6e80986f6793c669b57df4037 100644 (file)
--- 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
index 43a38ae5c29960ea65ee439751b5dc94fb657105..b774dbf2379916fdb6e61d8852020a1562a5f5a2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -802,6 +802,9 @@ Tools/Demos
 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.