|
Instrument Neutral Distributed Interface INDI 2.2.5
|
The ElapsedTimer class provides a fast way to calculate elapsed times. More...
#include <indielapsedtimer.h>
Public Member Functions | |
| ElapsedTimer () | |
| virtual | ~ElapsedTimer () |
| void | start () |
| Starts this timer. Once started, a timer value can be checked with elapsed(). | |
| int64_t | restart () |
| Restarts the timer and returns the number of milliseconds elapsed since the previous start. | |
| int64_t | elapsed () const |
| Returns the number of milliseconds since this ElapsedTimer was last started. | |
| int64_t | nsecsElapsed () const |
| Returns the number of nanoseconds since this ElapsedTimer was last started. | |
| bool | hasExpired (int64_t timeout) const |
| Returns true if this ElapsedTimer has already expired by timeout milliseconds. | |
| void | nsecsRewind (int64_t nsecs) |
| Rewind elapsed time of nsec nanoseconds. | |
Protected Member Functions | |
| ElapsedTimer (ElapsedTimerPrivate &dd) | |
Protected Attributes | |
| std::unique_ptr< ElapsedTimerPrivate > | d_ptr |
The ElapsedTimer class provides a fast way to calculate elapsed times.
The ElapsedTimer class is usually used to quickly calculate how much time has elapsed between two events.
Definition at line 35 of file indielapsedtimer.h.
| INDI::ElapsedTimer::ElapsedTimer | ( | ) |
Definition at line 25 of file indielapsedtimer.cpp.
|
virtual |
Definition at line 37 of file indielapsedtimer.cpp.
|
protected |
Definition at line 31 of file indielapsedtimer.cpp.
| int64_t INDI::ElapsedTimer::elapsed | ( | ) | const |
Returns the number of milliseconds since this ElapsedTimer was last started.
Definition at line 55 of file indielapsedtimer.cpp.
| bool INDI::ElapsedTimer::hasExpired | ( | int64_t | timeout | ) | const |
Returns true if this ElapsedTimer has already expired by timeout milliseconds.
Definition at line 69 of file indielapsedtimer.cpp.
| int64_t INDI::ElapsedTimer::nsecsElapsed | ( | ) | const |
Returns the number of nanoseconds since this ElapsedTimer was last started.
Definition at line 62 of file indielapsedtimer.cpp.
| void INDI::ElapsedTimer::nsecsRewind | ( | int64_t | nsecs | ) |
Rewind elapsed time of nsec nanoseconds.
Definition at line 74 of file indielapsedtimer.cpp.
| int64_t INDI::ElapsedTimer::restart | ( | ) |
Restarts the timer and returns the number of milliseconds elapsed since the previous start.
Definition at line 46 of file indielapsedtimer.cpp.
| void INDI::ElapsedTimer::start | ( | ) |
Starts this timer. Once started, a timer value can be checked with elapsed().
Definition at line 40 of file indielapsedtimer.cpp.
|
protected |
Definition at line 64 of file indielapsedtimer.h.