Go to the documentation of this file.
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 elapsed(void)
Returns milliseconds elapsed since last start() or restart()
void stop(void)
Stops timer, next call to isRunning() will return false and any calls to elapsed() or restart() will ...
bool isRunning(void) const
Returns true if start() or restart() has been called at least once since construction and since any c...
void start(void)
starts measuring elapsed time.
MythTimer(StartState state=kStartInactive)
Creates a timer.
std::chrono::milliseconds restart(void)
Returns milliseconds elapsed since last start() or restart() and resets the count.
std::chrono::milliseconds m_offset
std::chrono::nanoseconds nsecsElapsed(void) const
Returns nanoseconds elapsed since last start() or restart()
void addMSecs(std::chrono::milliseconds ms)
Adds an offset to the last call to start() or restart().