static inline void do_gettime(qint64 *sec, qint64 *frac) { timespec ts; qt_clock_gettime(unixCheckClockType(), &ts); *sec = ts.tv_sec; *frac = ts.tv_nsec; }
static inline void do_gettime(qint64 *sec, qint64 *frac) { #if (_POSIX_MONOTONIC_CLOCK-0 >= 0) unixCheckClockType(); if (is_likely(monotonicClockAvailable)) { timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); *sec = ts.tv_sec; *frac = ts.tv_nsec; return; } #endif *sec = 0; *frac = 0; }
QElapsedTimer::ClockType QElapsedTimer::clockType() { unixCheckClockType(); return monotonicClockAvailable ? MonotonicClock : SystemTime; }
bool QElapsedTimer::isMonotonic() { unixCheckClockType(); return monotonicClockAvailable; }