diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pytime.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Include/pytime.h b/Include/pytime.h index 221279b..a0cedb2 100644 --- a/Include/pytime.h +++ b/Include/pytime.h @@ -22,11 +22,25 @@ typedef struct { } _PyTime_timeval; #endif +/* Structure used by time.get_clock_info() */ +typedef struct { + const char *implementation; + int is_monotonic; + int is_adjusted; + double resolution; +} _Py_clock_info_t; + /* Similar to POSIX gettimeofday but cannot fail. If system gettimeofday * fails or is not available, fall back to lower resolution clocks. */ PyAPI_FUNC(void) _PyTime_gettimeofday(_PyTime_timeval *tp); +/* Similar to _PyTime_gettimeofday() but retrieve also information on the + * clock used to get the current time. */ +PyAPI_FUNC(void) _PyTime_gettimeofday_info( + _PyTime_timeval *tp, + _Py_clock_info_t *info); + #define _PyTime_ADD_SECONDS(tv, interval) \ do { \ tv.tv_usec += (long) (((long) interval - interval) * 1000000); \ |