Qwt User's Guide: qwt_system_clock.cpp Source File

Qwt User's Guide 6.2.0

qwt_system_clock.cpp
1 /******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #include "qwt_system_clock.h"
11 #include <qelapsedtimer.h>
12
14 bool QwtSystemClock::isNull() const
15 {
16 return m_timer.isValid();
17 }
18
20 void QwtSystemClock::start()
21 {
22 m_timer.start();
23 }
24
29 double QwtSystemClock::restart()
30 {
31 const qint64 nsecs = m_timer.restart();
32 return nsecs / 1e6;
33 }
34
36 double QwtSystemClock::elapsed() const
37 {
38 const qint64 nsecs = m_timer.nsecsElapsed();
39 return nsecs / 1e6;
40 }
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