Home
last modified time | relevance | path

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

/external/python/cpython3/Python/
Dpytime.c25 #define SEC_TO_NS (SEC_TO_MS * MS_TO_NS) macro
227 return _PyTime_ObjectToDenominator(obj, sec, nsec, SEC_TO_NS, round); in _PyTime_ObjectToTimespec()
244 Py_BUILD_ASSERT(INT_MAX <= _PyTime_MAX / SEC_TO_NS); in _PyTime_FromSeconds()
245 Py_BUILD_ASSERT(INT_MIN >= _PyTime_MIN / SEC_TO_NS); in _PyTime_FromSeconds()
248 assert((t >= 0 && t <= _PyTime_MAX / SEC_TO_NS) in _PyTime_FromSeconds()
249 || (t < 0 && t >= _PyTime_MIN / SEC_TO_NS)); in _PyTime_FromSeconds()
250 t *= SEC_TO_NS; in _PyTime_FromSeconds()
298 if (_PyTime_check_mul_overflow(t, SEC_TO_NS)) { in pytime_fromtimespec()
306 t = t * SEC_TO_NS; in pytime_fromtimespec()
344 if (_PyTime_check_mul_overflow(t, SEC_TO_NS)) { in pytime_fromtimeval()
[all …]
/external/python/cpython3/Lib/test/
Dtest_time.py27 SEC_TO_NS = 10 ** 9 variable
751 units = [1, US_TO_NS, MS_TO_NS, SEC_TO_NS]
780 ns = (2 ** pow2) * SEC_TO_NS
786 ns_timestamps.append(seconds * SEC_TO_NS)
794 ns = (2 ** 63 // SEC_TO_NS) * SEC_TO_NS
804 unit_to_ns = SEC_TO_NS / float(unit_to_sec)
807 unit_to_ns = SEC_TO_NS // unit_to_sec
835 ns = self.OVERFLOW_SECONDS * SEC_TO_NS
865 OVERFLOW_SECONDS = math.ceil((2**63 + 1) / SEC_TO_NS)
875 lambda secs: secs * SEC_TO_NS,
[all …]
/external/python/cpython3/Modules/
Dtimemodule.c51 #define SEC_TO_NS (1000 * 1000 * 1000) macro
112 if ((_PyTime_t)CLOCKS_PER_SEC > _PyTime_MAX / SEC_TO_NS) { in _PyTime_GetClockWithInfo()
133 *tp = _PyTime_MulDiv(ticks, SEC_TO_NS, (_PyTime_t)CLOCKS_PER_SEC); in _PyTime_GetClockWithInfo()
1240 #if LONG_MAX > _PyTime_MAX / SEC_TO_NS
1241 if ((_PyTime_t)freq > _PyTime_MAX / SEC_TO_NS) {
1261 total = _PyTime_MulDiv(t.tms_utime, SEC_TO_NS, ticks_per_second);
1262 total += _PyTime_MulDiv(t.tms_stime, SEC_TO_NS, ticks_per_second);
/external/iperf3/src/
Diperf.h368 #define SEC_TO_NS 1000000000LL /* too big for enum/const on some platforms */ macro