Home
last modified time | relevance | path

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

/third_party/python/Python/
Dpytime.c31 #define SEC_TO_NS (SEC_TO_MS * MS_TO_NS) macro
233 return _PyTime_ObjectToDenominator(obj, sec, nsec, SEC_TO_NS, round); in _PyTime_ObjectToTimespec()
250 Py_BUILD_ASSERT(INT_MAX <= _PyTime_MAX / SEC_TO_NS); in _PyTime_FromSeconds()
251 Py_BUILD_ASSERT(INT_MIN >= _PyTime_MIN / SEC_TO_NS); in _PyTime_FromSeconds()
254 assert((t >= 0 && t <= _PyTime_MAX / SEC_TO_NS) in _PyTime_FromSeconds()
255 || (t < 0 && t >= _PyTime_MIN / SEC_TO_NS)); in _PyTime_FromSeconds()
256 t *= SEC_TO_NS; in _PyTime_FromSeconds()
304 if (_PyTime_check_mul_overflow(t, SEC_TO_NS)) { in pytime_fromtimespec()
312 t = t * SEC_TO_NS; in pytime_fromtimespec()
350 if (_PyTime_check_mul_overflow(t, SEC_TO_NS)) { in pytime_fromtimeval()
[all …]
/third_party/python/Lib/test/
Dtest_time.py28 SEC_TO_NS = 10 ** 9 variable
753 units = [1, US_TO_NS, MS_TO_NS, SEC_TO_NS]
782 ns = (2 ** pow2) * SEC_TO_NS
788 ns_timestamps.append(seconds * SEC_TO_NS)
796 ns = (2 ** 63 // SEC_TO_NS) * SEC_TO_NS
806 unit_to_ns = SEC_TO_NS / float(unit_to_sec)
809 unit_to_ns = SEC_TO_NS // unit_to_sec
837 ns = self.OVERFLOW_SECONDS * SEC_TO_NS
867 OVERFLOW_SECONDS = math.ceil((2**63 + 1) / SEC_TO_NS)
877 lambda secs: secs * SEC_TO_NS,
[all …]
/third_party/python/Modules/
Dtimemodule.c63 #define SEC_TO_NS (1000 * 1000 * 1000) macro
138 if ((_PyTime_t)CLOCKS_PER_SEC > _PyTime_MAX / SEC_TO_NS) { in _PyTime_GetClockWithInfo()
159 *tp = _PyTime_MulDiv(ticks, SEC_TO_NS, (_PyTime_t)CLOCKS_PER_SEC); in _PyTime_GetClockWithInfo()
1308 #if LONG_MAX > _PyTime_MAX / SEC_TO_NS
1309 if ((_PyTime_t)freq > _PyTime_MAX / SEC_TO_NS) {
1329 total = _PyTime_MulDiv(t.tms_utime, SEC_TO_NS, ticks_per_second);
1330 total += _PyTime_MulDiv(t.tms_stime, SEC_TO_NS, ticks_per_second);