#include <timeout.h>
Inheritance diagram for Monitor::Utility::Timeout:
Public Methods | |
Timeout (const CallbackBase &newWatch, unsigned newPeriod, const string &newName="") | |
Constructor. More... | |
Timeout (unsigned newPeriod, const string &newName="") | |
Constructor. More... | |
virtual | ~Timeout () |
Destructor. More... | |
int | operator== (const Timeout &other) |
Equivalence operator. More... | |
void | reset (unsigned newPeriod=0) |
Clock time at which timeout will expire = current clock time + period. More... | |
int | hasExpired () const |
int | run () |
If timeout can run (callback and target set, not yet expired) checks time to see if it is now due, if so 'expires' itself. More... | |
const string & | getTimeoutName () const |
Private Methods | |
Timeout () | |
Default construction is not allowed. More... | |
Timeout (const Timeout &) | |
Copy construction is not allowed. More... | |
Timeout & | operator= (const Timeout &) |
Assignment is not allowed. More... | |
virtual int | canRun () |
void | expire () |
Invoked when timeout expires. More... | |
Private Attributes | |
unsigned | period |
Timeout period. More... | |
clock_t | endTime |
Clock time at which timeout is expired, calculated when period is set. More... | |
string | timeoutName |
int | expiredFlag |
Definition at line 53 of file timeout.h.
|
Constructor. On construction timeout adds itself to a singleton list.
Definition at line 47 of file timeout.cpp. References _USEMYTRACE_. |
|
Constructor.
Definition at line 69 of file timeout.cpp. References _USEMYTRACE_, reset, and timeoutName. |
|
Destructor. On destruction timeout removes itself from a singleton list. Definition at line 87 of file timeout.cpp. References _USEMYTRACE_, and timeoutName. |
|
Default construction is not allowed.
|
|
Copy construction is not allowed.
Definition at line 140 of file timeout.h. References Timeout. |
|
Definition at line 179 of file timeout.cpp. References endTime, and expiredFlag. Referenced by run. |
|
Invoked when timeout expires.
Definition at line 188 of file timeout.cpp. References _USEMYTRACE_, expiredFlag, timeoutName, and Monitor::Utility::Watchable::updated. Referenced by run. |
|
Definition at line 171 of file timeout.cpp. References timeoutName. |
|
Definition at line 141 of file timeout.cpp. References expiredFlag. |
|
Assignment is not allowed.
Definition at line 147 of file timeout.h. References Timeout. |
|
Equivalence operator.
Definition at line 102 of file timeout.cpp. |
|
Clock time at which timeout will expire = current clock time + period.
Definition at line 110 of file timeout.cpp. References _USEMYTRACE_, endTime, expiredFlag, period, and timeoutName. Referenced by Timeout. |
|
If timeout can run (callback and target set, not yet expired) checks time to see if it is now due, if so 'expires' itself.
Definition at line 149 of file timeout.cpp. |
|
Clock time at which timeout is expired, calculated when period is set.
|
|
Definition at line 162 of file timeout.h. Referenced by canRun, expire, hasExpired, and reset. |
|
Timeout period.
Definition at line 125 of file timeout.h. Referenced by reset. |
|
Definition at line 161 of file timeout.h. Referenced by expire, getTimeoutName, reset, Timeout, and ~Timeout. |