Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
3rdparty
qwt
src
qwt_system_clock.cpp
Go to the documentation of this file.
1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
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
13
class
QwtSystemClock::PrivateData
14
{
15
public
:
16
QElapsedTimer
timer
;
17
};
18
19
QwtSystemClock::QwtSystemClock
()
20
{
21
d_data
=
new
PrivateData
();
22
}
23
24
QwtSystemClock::~QwtSystemClock
()
25
{
26
delete
d_data
;
27
}
28
29
bool
QwtSystemClock::isNull
()
const
30
{
31
return
d_data
->
timer
.isValid();
32
}
33
34
void
QwtSystemClock::start
()
35
{
36
d_data
->
timer
.start();
37
}
38
39
double
QwtSystemClock::restart
()
40
{
41
const
qint64 nsecs =
d_data
->
timer
.restart();
42
return
nsecs / 1e6;
43
}
44
45
double
QwtSystemClock::elapsed
()
const
46
{
47
const
qint64 nsecs =
d_data
->
timer
.nsecsElapsed();
48
return
nsecs / 1e6;
49
}
qwt_system_clock.h
QwtSystemClock::start
void start()
Definition:
qwt_system_clock.cpp:34
QwtSystemClock::~QwtSystemClock
virtual ~QwtSystemClock()
Definition:
qwt_system_clock.cpp:24
QwtSystemClock::d_data
PrivateData * d_data
Definition:
qwt_system_clock.h:39
QwtSystemClock::QwtSystemClock
QwtSystemClock()
Definition:
qwt_system_clock.cpp:19
QwtSystemClock::PrivateData::timer
QElapsedTimer timer
Definition:
qwt_system_clock.cpp:16
QwtSystemClock::isNull
bool isNull() const
Definition:
qwt_system_clock.cpp:29
QwtSystemClock::elapsed
double elapsed() const
Definition:
qwt_system_clock.cpp:45
QwtSystemClock::restart
double restart()
Definition:
qwt_system_clock.cpp:39
QwtSystemClock::PrivateData
Definition:
qwt_system_clock.cpp:13
plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10