diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pytime.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Include/pytime.h b/Include/pytime.h index 95d482fee3..fd95045519 100644 --- a/Include/pytime.h +++ b/Include/pytime.h @@ -192,20 +192,21 @@ PyAPI_FUNC(int) _PyTime_localtime(time_t t, struct tm *tm); Return 0 on success, raise an exception and return -1 on error. */ PyAPI_FUNC(int) _PyTime_gmtime(time_t t, struct tm *tm); -#ifdef MS_WINDOWS -PyAPI_FUNC(int) _PyTime_GetWinPerfCounterWithInfo( - _PyTime_t *t, - _Py_clock_info_t *info); -#endif +/* Get the performance counter: clock with the highest available resolution to + measure a short duration. + + The function cannot fail. _PyTime_Init() ensures that the system clock + works. */ +PyAPI_FUNC(double) _PyTime_GetPerfCounterDouble(void); /* Get the performance counter: clock with the highest available resolution to - measure a short duration. */ -PyAPI_FUNC(_PyTime_t) _PyTime_GetPerfCounter(void); + measure a short duration. -/* Similar to _PyTime_GetPerfCounter(), - but get also clock info if info is non-NULL. */ -PyAPI_FUNC(int) _PyTime_GetPerfCounterWithInfo( - _PyTime_t *t, + Fill info (if set) with information of the function used to get the time. + + Return 0 on success, raise an exception and return -1 on error. */ +PyAPI_FUNC(int) _PyTime_GetPerfCounterDoubleWithInfo( + double *t, _Py_clock_info_t *info); #ifdef __cplusplus |