28#ifdef DEBUG_TIMER_API_USAGE
95#ifdef DEBUG_TIMER_API_USAGE
96 assert(0 ==
"elapsed called without timer being started");
101 auto e = std::chrono::milliseconds(
m_timer.elapsed());
102 if (!QElapsedTimer::isMonotonic() && (e > (24h - 100s)))
123#ifdef DEBUG_TIMER_API_USAGE
124 assert(0 ==
"elapsed called without timer being started");
std::chrono::milliseconds m_offset
void addMSecs(std::chrono::milliseconds ms)
Adds an offset to the last call to start() or restart().
std::chrono::nanoseconds nsecsElapsed(void) const
Returns nanoseconds elapsed since last start() or restart()
std::chrono::milliseconds restart(void)
Returns milliseconds elapsed since last start() or restart() and resets the count.
std::chrono::milliseconds elapsed(void)
Returns milliseconds elapsed since last start() or restart()
bool isRunning(void) const
Returns true if start() or restart() has been called at least once since construction and since any c...
void stop(void)
Stops timer, next call to isRunning() will return false and any calls to elapsed() or restart() will ...
MythTimer(StartState state=kStartInactive)
Creates a timer.
void start(void)
starts measuring elapsed time.