Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(743)

Unified Diff: Modules/gcmodule.c

Issue 22043: Use a monotonic clock to compute timeouts
Patch Set: Created 3 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Modules/_threadmodule.c ('k') | Modules/socketmodule.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Modules/gcmodule.c Sun Aug 31 14:47:56 2014 +0200
+++ b/Modules/gcmodule.c Sun Aug 31 15:02:13 2014 +0200
@@ -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_co
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_co
}
if (debug & DEBUG_STATS) {
_PyTime_timeval t2;
- _PyTime_gettimeofday(&t2);
+ _PyTime_monotonic(&t2);
if (m == 0 && n == 0)
PySys_WriteStderr("gc: done");
« no previous file with comments | « Modules/_threadmodule.c ('k') | Modules/socketmodule.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7