Qwt User's Guide 6.1.0

- Main Page
- Related Pages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
QwtSystemClock Class Reference

QwtSystemClock provides high resolution clock time functions. More...

`#include <qwt_system_clock.h>`

## Public Member Functions
| QwtSystemClock ()
| Constructs a null clock object.
virtual | ~QwtSystemClock ()
| Destructor.
bool | isNull () const
void | start ()
double | restart ()
double | elapsed () const

## Detailed Description

QwtSystemClock provides high resolution clock time functions.

Sometimes the resolution offered by QTime ( millisecond ) is not accurate enough for implementing time measurements ( f.e. sampling ). QwtSystemClock offers a subset of the QTime functionality using higher resolution timers ( if possible ).

Precision and time intervals are multiples of milliseconds (ms).

Note
  The implementation uses high-resolution performance counter on Windows, mach_absolute_time() on the Mac or POSIX timers on other systems. If none is available it falls back on QTimer.

## Member Function Documentation

double QwtSystemClock::elapsed | ( |  | ) | const

Returns
  Number of milliseconds that have elapsed since the last time start() or restart() was called or 0.0 for null clocks.

bool QwtSystemClock::isNull | ( |  | ) | const

Returns
  true if the clock has never been started.

double QwtSystemClock::restart | ( |  | ) |

Set the start time to the current time

Returns
  Time, that is elapsed since the previous start time.

void QwtSystemClock::start | ( |  | ) |

Sets the start time to the current time.