diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-09-02 21:18:25 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-09-02 21:18:25 (GMT) |
commit | ae58649721ec898ea4a101b0861e16fff3511cfa (patch) | |
tree | bb08b1a9b5f354212d7ca365d76659b09aed879a /Modules/gcmodule.c | |
parent | 9bb758cee7f1694807ebe600b6230fb8e565d3ea (diff) | |
download | cpython-ae58649721ec898ea4a101b0861e16fff3511cfa.zip cpython-ae58649721ec898ea4a101b0861e16fff3511cfa.tar.gz cpython-ae58649721ec898ea4a101b0861e16fff3511cfa.tar.bz2 |
Issue #22043: time.monotonic() is now always available
threading.Lock.acquire(), threading.RLock.acquire() and socket operations now
use a monotonic clock, instead of the system clock, when a timeout is used.
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r-- | Modules/gcmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 5e8e17b..142687b 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -25,7 +25,7 @@ #include "Python.h" #include "frameobject.h" /* for PyFrame_ClearFreeList */ -#include "pytime.h" /* for _PyTime_gettimeofday, _PyTime_INTERVAL */ +#include "pytime.h" /* for _PyTime_monotonic, _PyTime_INTERVAL */ /* Get an object's GC head */ #define AS_GC(o) ((PyGC_Head *)(o)-1) @@ -919,7 +919,7 @@ collect(int generation, Py_ssize_t *n_collected, Py_ssize_t *n_uncollectable, for (i = 0; i < NUM_GENERATIONS; i++) PySys_FormatStderr(" %zd", gc_list_size(GEN_HEAD(i))); - _PyTime_gettimeofday(&t1); + _PyTime_monotonic(&t1); PySys_WriteStderr("\n"); } @@ -1025,7 +1025,7 @@ collect(int generation, Py_ssize_t *n_collected, Py_ssize_t *n_uncollectable, } if (debug & DEBUG_STATS) { _PyTime_timeval t2; - _PyTime_gettimeofday(&t2); + _PyTime_monotonic(&t2); if (m == 0 && n == 0) PySys_WriteStderr("gc: done"); |