static PyObject* perf_counter(_Py_clock_info_t *info) { #if defined(WIN32_PERF_COUNTER) || defined(PYMONOTONIC) PyObject *res; #endif #if defined(WIN32_PERF_COUNTER) static int use_perf_counter = 1; #endif #ifdef PYMONOTONIC static int use_monotonic = 1; #endif #ifdef WIN32_PERF_COUNTER if (use_perf_counter) { if (win_perf_counter(info, &res) == 0) return res; use_perf_counter = 0; } #endif #ifdef PYMONOTONIC if (use_monotonic) { res = pymonotonic(info); if (res != NULL) return res; use_monotonic = 0; PyErr_Clear(); } #endif return floattime(info); }
static PyObject* perf_counter(_Py_clock_info_t *info) { #ifdef WIN32_PERF_COUNTER return win_perf_counter(info); #else return pymonotonic(info); #endif }
static PyObject* pyclock(_Py_clock_info_t *info) { #ifdef WIN32_PERF_COUNTER return win_perf_counter(info); #else return floatclock(info); #endif }
static PyObject* pyclock(_Py_clock_info_t *info) { #ifdef WIN32_PERF_COUNTER PyObject *res; if (win_perf_counter(info, &res) == 0) return res; #endif return floatclock(info); }