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 
14 {
15 public:
16  QElapsedTimer timer;
17 };
18 
20 {
21  d_data = new PrivateData();
22 }
23 
25 {
26  delete d_data;
27 }
28 
30 {
31  return d_data->timer.isValid();
32 }
33 
35 {
36  d_data->timer.start();
37 }
38 
40 {
41  const qint64 nsecs = d_data->timer.restart();
42  return nsecs / 1e6;
43 }
44 
46 {
47  const qint64 nsecs = d_data->timer.nsecsElapsed();
48  return nsecs / 1e6;
49 }
virtual ~QwtSystemClock()
PrivateData * d_data
bool isNull() const
double elapsed() const


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10