Jpp
15.0.0-rc.2
the software that should make you happy
|
Time keeper. More...
#include <JTimekeeper.hh>
Public Member Functions | |
JTimekeeper () | |
Default constructor. More... | |
JTimekeeper (const long long int interval_us) | |
Constructor. More... | |
long long int | getInterval () const |
Get interval time. More... | |
long long int | getDelay () const |
Get total delay time. More... | |
void | setInterval (const long long int interval_us) |
Set interval time. More... | |
void | reset (const long long int t0) |
Reset time. More... | |
void | reset () |
Reset time. More... | |
bool | operator() () const |
Check whether the number of time intervals has elapsed since the last call to the reset method. More... | |
void | wait () const |
Wait until the number of time intervals has elapsed since the last call to the reset method. More... | |
bool | wait (JFileDescriptorMask &mask) const |
Wait until the number of time intervals has elapsed since the last call to the reset method or input data have become available on one of the file descriptors in the given mask. More... | |
Protected Attributes | |
long long int | interval |
interval time [us] More... | |
Private Attributes | |
long long int | t0 |
t0 of elapsed time [us] More... | |
long long int | total_delay |
total delay time [us] More... | |
long long int | counter |
interval counter More... | |
Time keeper.
This class can be used to check whether elapsed time exceeds preset time interval or to wait until preset time interval has elapsed.
Definition at line 34 of file JTimekeeper.hh.
|
inline |
Default constructor.
Definition at line 39 of file JTimekeeper.hh.
|
inline |
Constructor.
interval_us | interval time [us] |
Definition at line 53 of file JTimekeeper.hh.
|
inline |
|
inline |
Get total delay time.
Definition at line 78 of file JTimekeeper.hh.
|
inline |
Set interval time.
interval_us | interval time [us] |
Definition at line 89 of file JTimekeeper.hh.
|
inline |
Reset time.
t0 | time [us] |
Definition at line 100 of file JTimekeeper.hh.
|
inline |
Reset time.
Definition at line 111 of file JTimekeeper.hh.
|
inline |
Check whether the number of time intervals has elapsed since the last call to the reset method.
The number of intervals is equal to the number of calls this method returned true since the last call to the reset method.
Definition at line 125 of file JTimekeeper.hh.
|
inline |
Wait until the number of time intervals has elapsed since the last call to the reset method.
The number of intervals is equal to the number of calls to the method wait since the last call to the reset method.
Definition at line 145 of file JTimekeeper.hh.
|
inline |
Wait until the number of time intervals has elapsed since the last call to the reset method or input data have become available on one of the file descriptors in the given mask.
The number of intervals is equal to the number of calls to the method wait since the last call to the reset method. Note that the mask is overwritten following a select call.
mask | input mask |
Definition at line 176 of file JTimekeeper.hh.
|
protected |
interval time [us]
Definition at line 207 of file JTimekeeper.hh.
|
mutableprivate |
t0 of elapsed time [us]
Definition at line 210 of file JTimekeeper.hh.
|
mutableprivate |
total delay time [us]
Definition at line 211 of file JTimekeeper.hh.
|
mutableprivate |
interval counter
Definition at line 212 of file JTimekeeper.hh.