qt tools: enable use of Qt5 toolchain, headers and libraries
[pcp.git] / src / libpcp_qwt / src / qwt_system_clock.h
blobb134b11fc66adf5ea9836de6419119e843ff932f
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
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 *****************************************************************************/
10 #ifndef QWT_SYSTEM_CLOCK_H
11 #define QWT_SYSTEM_CLOCK_H
13 #include "qwt_global.h"
15 /*!
16 \brief QwtSystemClock provides high resolution clock time functions.
18 Sometimes the resolution offered by QTime ( millisecond ) is not accurate
19 enough for implementing time measurements ( f.e. sampling ).
20 QwtSystemClock offers a subset of the QTime functionality using higher
21 resolution timers ( if possible ).
23 Precision and time intervals are multiples of milliseconds (ms).
25 \note The implementation uses high-resolution performance counter on Windows,
26 mach_absolute_time() on the Mac or POSIX timers on other systems.
27 If none is available it falls back on QTimer.
30 class QWT_EXPORT QwtSystemClock
32 public:
33 QwtSystemClock();
34 virtual ~QwtSystemClock();
36 bool isNull() const;
38 void start();
39 double restart();
40 double elapsed() const;
42 private:
43 class PrivateData;
44 PrivateData *d_data;
47 #endif