Lines Matching refs:_PyTime_t
18 (_PyTime_t)(a) < _PyTime_MIN / (_PyTime_t)(b) \
19 || _PyTime_MAX / (_PyTime_t)(b) < (_PyTime_t)(a))
52 _PyTime_t
53 _PyTime_MulDiv(_PyTime_t ticks, _PyTime_t mul, _PyTime_t div) in _PyTime_MulDiv()
55 _PyTime_t intpart, remaining; in _PyTime_MulDiv()
243 _PyTime_t
246 _PyTime_t t; in _PyTime_FromSeconds()
253 t = (_PyTime_t)seconds; in _PyTime_FromSeconds()
260 _PyTime_t
261 _PyTime_FromNanoseconds(_PyTime_t ns) in _PyTime_FromNanoseconds()
268 _PyTime_FromNanosecondsObject(_PyTime_t *tp, PyObject *obj) in _PyTime_FromNanosecondsObject()
271 _PyTime_t t; in _PyTime_FromNanosecondsObject()
279 Py_BUILD_ASSERT(sizeof(long long) == sizeof(_PyTime_t)); in _PyTime_FromNanosecondsObject()
289 t = (_PyTime_t)nsec; in _PyTime_FromNanosecondsObject()
296 pytime_fromtimespec(_PyTime_t *tp, struct timespec *ts, int raise) in pytime_fromtimespec()
298 _PyTime_t t, nsec; in pytime_fromtimespec()
301 Py_BUILD_ASSERT(sizeof(ts->tv_sec) <= sizeof(_PyTime_t)); in pytime_fromtimespec()
302 t = (_PyTime_t)ts->tv_sec; in pytime_fromtimespec()
334 _PyTime_FromTimespec(_PyTime_t *tp, struct timespec *ts) in _PyTime_FromTimespec()
342 pytime_fromtimeval(_PyTime_t *tp, struct timeval *tv, int raise) in pytime_fromtimeval()
344 _PyTime_t t, usec; in pytime_fromtimeval()
347 Py_BUILD_ASSERT(sizeof(tv->tv_sec) <= sizeof(_PyTime_t)); in pytime_fromtimeval()
348 t = (_PyTime_t)tv->tv_sec; in pytime_fromtimeval()
361 usec = (_PyTime_t)tv->tv_usec * US_TO_NS; in pytime_fromtimeval()
380 _PyTime_FromTimeval(_PyTime_t *tp, struct timeval *tv) in _PyTime_FromTimeval()
387 _PyTime_FromDouble(_PyTime_t *t, double value, _PyTime_round_t round, in _PyTime_FromDouble()
398 if (!_Py_InIntegralTypeRange(_PyTime_t, d)) { in _PyTime_FromDouble()
402 *t = (_PyTime_t)d; in _PyTime_FromDouble()
407 _PyTime_FromObject(_PyTime_t *t, PyObject *obj, _PyTime_round_t round, in _PyTime_FromObject()
421 Py_BUILD_ASSERT(sizeof(long long) <= sizeof(_PyTime_t)); in _PyTime_FromObject()
441 _PyTime_FromSecondsObject(_PyTime_t *t, PyObject *obj, _PyTime_round_t round) in _PyTime_FromSecondsObject()
447 _PyTime_FromMillisecondsObject(_PyTime_t *t, PyObject *obj, _PyTime_round_t round) in _PyTime_FromMillisecondsObject()
453 _PyTime_AsSecondsDouble(_PyTime_t t) in _PyTime_AsSecondsDouble()
459 _PyTime_t secs; in _PyTime_AsSecondsDouble()
473 _PyTime_AsNanosecondsObject(_PyTime_t t) in _PyTime_AsNanosecondsObject()
475 Py_BUILD_ASSERT(sizeof(long long) >= sizeof(_PyTime_t)); in _PyTime_AsNanosecondsObject()
479 static _PyTime_t
480 _PyTime_Divide(const _PyTime_t t, const _PyTime_t k, in _PyTime_Divide()
485 _PyTime_t x, r, abs_r; in _PyTime_Divide()
526 _PyTime_t
527 _PyTime_AsMilliseconds(_PyTime_t t, _PyTime_round_t round) in _PyTime_AsMilliseconds()
532 _PyTime_t
533 _PyTime_AsMicroseconds(_PyTime_t t, _PyTime_round_t round) in _PyTime_AsMicroseconds()
539 _PyTime_AsTimeval_impl(_PyTime_t t, _PyTime_t *p_secs, int *p_us, in _PyTime_AsTimeval_impl()
542 _PyTime_t secs, ns; in _PyTime_AsTimeval_impl()
577 _PyTime_AsTimevalStruct_impl(_PyTime_t t, struct timeval *tv, in _PyTime_AsTimevalStruct_impl()
580 _PyTime_t secs, secs2; in _PyTime_AsTimevalStruct_impl()
593 secs2 = (_PyTime_t)tv->tv_sec; in _PyTime_AsTimevalStruct_impl()
604 _PyTime_AsTimeval(_PyTime_t t, struct timeval *tv, _PyTime_round_t round) in _PyTime_AsTimeval()
610 _PyTime_AsTimeval_noraise(_PyTime_t t, struct timeval *tv, _PyTime_round_t round) in _PyTime_AsTimeval_noraise()
616 _PyTime_AsTimevalTime_t(_PyTime_t t, time_t *p_secs, int *us, in _PyTime_AsTimevalTime_t()
619 _PyTime_t secs; in _PyTime_AsTimevalTime_t()
626 if (res < 0 || (_PyTime_t)*p_secs != secs) { in _PyTime_AsTimevalTime_t()
636 _PyTime_AsTimespec(_PyTime_t t, struct timespec *ts) in _PyTime_AsTimespec()
638 _PyTime_t secs, nsec; in _PyTime_AsTimespec()
650 if ((_PyTime_t)ts->tv_sec != secs) { in _PyTime_AsTimespec()
659 py_get_system_clock(_PyTime_t *tp, _Py_clock_info_t *info, int raise) in py_get_system_clock()
768 _PyTime_t
771 _PyTime_t t; in _PyTime_GetSystemClock()
781 _PyTime_GetSystemClockWithInfo(_PyTime_t *t, _Py_clock_info_t *info) in _PyTime_GetSystemClockWithInfo()
788 py_mach_timebase_info(_PyTime_t *pnumer, _PyTime_t *pdenom, int raise) in py_mach_timebase_info()
808 Py_BUILD_ASSERT(sizeof(timebase.numer) < sizeof(_PyTime_t)); in py_mach_timebase_info()
809 Py_BUILD_ASSERT(sizeof(timebase.denom) < sizeof(_PyTime_t)); in py_mach_timebase_info()
821 if ((_PyTime_t)timebase.numer > _PyTime_MAX / (_PyTime_t)timebase.denom) { in py_mach_timebase_info()
829 *pnumer = (_PyTime_t)timebase.numer; in py_mach_timebase_info()
830 *pdenom = (_PyTime_t)timebase.denom; in py_mach_timebase_info()
837 py_get_monotonic_clock(_PyTime_t *tp, _Py_clock_info_t *info, int raise) in py_get_monotonic_clock()
841 _PyTime_t t; in py_get_monotonic_clock()
846 Py_BUILD_ASSERT(sizeof(ticks) <= sizeof(_PyTime_t)); in py_get_monotonic_clock()
847 t = (_PyTime_t)ticks; in py_get_monotonic_clock()
877 static _PyTime_t timebase_numer = 0; in py_get_monotonic_clock()
878 static _PyTime_t timebase_denom = 0; in py_get_monotonic_clock()
893 *tp = _PyTime_MulDiv((_PyTime_t)ticks, timebase_numer, timebase_denom); in py_get_monotonic_clock()
953 _PyTime_t
956 _PyTime_t t; in _PyTime_GetMonotonicClock()
966 _PyTime_GetMonotonicClockWithInfo(_PyTime_t *tp, _Py_clock_info_t *info) in _PyTime_GetMonotonicClockWithInfo()
1024 py_get_win_perf_counter(_PyTime_t *tp, _Py_clock_info_t *info, int raise) in py_get_win_perf_counter()
1046 _PyTime_t ticks; in py_get_win_perf_counter()
1048 ticks = (_PyTime_t)ticksll; in py_get_win_perf_counter()
1050 *tp = _PyTime_MulDiv(ticks, SEC_TO_NS, (_PyTime_t)frequency); in py_get_win_perf_counter()
1057 _PyTime_GetPerfCounterWithInfo(_PyTime_t *t, _Py_clock_info_t *info) in _PyTime_GetPerfCounterWithInfo()
1067 _PyTime_t
1070 _PyTime_t t; in _PyTime_GetPerfCounter()