_PyTime_t _PyTime_GetSystemClock(void) { _PyTime_t t; if (pygettimeofday(&t, NULL, 0) < 0) { /* should not happen, _PyTime_Init() checked the clock at startup */ assert(0); /* use a fixed value instead of a random value from the stack */ t = 0; } return t; }
int _PyTime_GetSystemClockWithInfo(_PyTime_t *t, _Py_clock_info_t *info) { return pygettimeofday(t, info, 1); }
void _PyTime_gettimeofday_info(_PyTime_timeval *tp, _Py_clock_info_t *info) { pygettimeofday(tp, info); }
void _PyTime_gettimeofday(_PyTime_timeval *tp) { pygettimeofday(tp, NULL); }