Loading...
Searching...
No Matches
qwt_system_clock.cpp
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#include "qwt_system_clock.h"
#include <qelapsedtimer.h>
bool QwtSystemClock::isNull() const
{
return m_timer.isValid();
}
void QwtSystemClock::start()
{
m_timer.start();
}
double QwtSystemClock::restart()
{
const qint64 nsecs = m_timer.restart();
return nsecs / 1e6;
}
double QwtSystemClock::elapsed() const
{
const qint64 nsecs = m_timer.nsecsElapsed();
return nsecs / 1e6;
}
QwtSystemClock::start
void start()
Start the elapsed timer.
Definition qwt_system_clock.cpp:20
QwtSystemClock::restart
double restart()
Definition qwt_system_clock.cpp:29
QwtSystemClock::elapsed
double elapsed() const
Definition qwt_system_clock.cpp:36
QwtSystemClock::isNull
bool isNull() const
Definition qwt_system_clock.cpp:14