Home
last modified time | relevance | path

Searched refs:SEC_TO_NS (Results 1 - 3 of 3) sorted by relevance

/third_party/python/Python/
H A Dpytime.c26 #define SEC_TO_NS (SEC_TO_MS * MS_TO_NS) macro
395 return pytime_object_to_denominator(obj, sec, nsec, SEC_TO_NS, round); in _PyTime_ObjectToTimespec()
411 bits, whereas _PyTime_t type has at least 64 bits (SEC_TO_NS takes 30 in _PyTime_FromSeconds()
413 static_assert(INT_MAX <= _PyTime_MAX / SEC_TO_NS, "_PyTime_t overflow"); in _PyTime_FromSeconds()
414 static_assert(INT_MIN >= _PyTime_MIN / SEC_TO_NS, "_PyTime_t underflow"); in _PyTime_FromSeconds()
417 assert((t >= 0 && t <= _PyTime_MAX / SEC_TO_NS) in _PyTime_FromSeconds()
418 || (t < 0 && t >= _PyTime_MIN / SEC_TO_NS)); in _PyTime_FromSeconds()
419 t *= SEC_TO_NS; in _PyTime_FromSeconds()
467 int res1 = pytime_mul(&t, SEC_TO_NS); in pytime_fromtimespec()
497 int res1 = pytime_mul(&t, SEC_TO_NS); in pytime_fromtimeval()
[all...]
/third_party/python/Lib/test/
H A Dtest_time.py28 SEC_TO_NS = 10 ** 9 variable
783 units = [1, US_TO_NS, MS_TO_NS, SEC_TO_NS]
812 ns = (2 ** pow2) * SEC_TO_NS
818 ns_timestamps.append(seconds * SEC_TO_NS)
826 ns = (2 ** 63 // SEC_TO_NS) * SEC_TO_NS
836 unit_to_ns = SEC_TO_NS / float(unit_to_sec)
839 unit_to_ns = SEC_TO_NS // unit_to_sec
867 ns = self.OVERFLOW_SECONDS * SEC_TO_NS
897 OVERFLOW_SECONDS = math.ceil((2**63 + 1) / SEC_TO_NS)
[all...]
/third_party/python/Modules/
H A Dtimemodule.c62 #define SEC_TO_NS (1000 * 1000 * 1000) macro
148 /* Make sure that _PyTime_MulDiv(ticks, SEC_TO_NS, CLOCKS_PER_SEC) in _PyTime_GetClockWithInfo()
150 if ((_PyTime_t)CLOCKS_PER_SEC > _PyTime_MAX / SEC_TO_NS) { in _PyTime_GetClockWithInfo()
171 _PyTime_t ns = _PyTime_MulDiv(ticks, SEC_TO_NS, (_PyTime_t)CLOCKS_PER_SEC); in _PyTime_GetClockWithInfo()
1332 /* check that _PyTime_MulDiv(t, SEC_TO_NS, ticks_per_second)
1334 #if LONG_MAX > _PyTime_MAX / SEC_TO_NS
1335 if ((_PyTime_t)freq > _PyTime_MAX / SEC_TO_NS) {
1355 ns = _PyTime_MulDiv(t.tms_utime, SEC_TO_NS, ticks_per_second);
1356 ns += _PyTime_MulDiv(t.tms_stime, SEC_TO_NS, ticks_per_second);

Completed in 6 milliseconds