diff -r 4034c96a98a7 Modules/gcmodule.c --- a/Modules/gcmodule.c Fri May 23 14:09:34 2014 +0300 +++ b/Modules/gcmodule.c Fri May 23 09:15:36 2014 -0400 @@ -25,6 +25,7 @@ #include "Python.h" #include "frameobject.h" /* for PyFrame_ClearFreeList */ +#include "pytime.h" /* Get an object's GC head */ #define AS_GC(o) ((PyGC_Head *)(o)-1) @@ -899,17 +900,9 @@ { double result = 0; if (tmod != NULL) { - _Py_IDENTIFIER(time); - - PyObject *f = _PyObject_CallMethodId(tmod, &PyId_time, NULL); - if (f == NULL) { - PyErr_Clear(); - } - else { - if (PyFloat_Check(f)) - result = PyFloat_AsDouble(f); - Py_DECREF(f); - } + _PyTime_timeval tval; + _PyTime_gettimeofday(&tval); + result = tval.tv_sec + tval.tv_usec * 1e-6; } return result; }