|
E-MailRelay
|
An interface used by GNet::TimerList to keep track of pending timeouts and to deliver timeout events. More...
#include <gtimer.h>
Inheritance diagram for GNet::TimerBase:Public Member Functions | |
| virtual | ~TimerBase () |
| Destructor. | |
| void | startTimer (unsigned int interval_s, unsigned int interval_us=0U) |
| Starts the timer so that it goes off after the given time interval. More... | |
| void | startTimer (const G::EpochTime &interval_time) |
| Overload for an interval expressed as an G::EpochTime. | |
| void | cancelTimer () |
| Cancels the timer. | |
| bool | active () const |
| Returns true if the timer is started and not cancelled. | |
| bool | immediate () const |
| Used by TimerList. More... | |
| void | doTimeout () |
| Used by TimerList to execute the onTimeout() callback. | |
| G::EpochTime | t () const |
| Used by TimerList to get the expiry epoch time. | |
| bool | expired (G::EpochTime &) const |
| Used by TimerList. More... | |
Protected Member Functions | |
| TimerBase (ExceptionHandler &) | |
| Constructor. | |
| virtual void | onTimeout ()=0 |
| Called when the timer expires (or soon after). | |
An interface used by GNet::TimerList to keep track of pending timeouts and to deliver timeout events.
The public methods to start and cancel the timer are normally used via GNet::Timer<>.
| bool GNet::TimerBase::expired | ( | G::EpochTime & | now | ) | const |
Used by TimerList.
Returns true if expired when compared to the given epoch time.
Definition at line 52 of file gtimer.cpp.
| bool GNet::TimerBase::immediate | ( | ) | const |
Used by TimerList.
Returns true if the timer is active() and zero-length.
Definition at line 45 of file gtimer.cpp.
| void GNet::TimerBase::startTimer | ( | unsigned int | interval_s, |
| unsigned int | interval_us = 0U |
||
| ) |
Starts the timer so that it goes off after the given time interval.
Definition at line 69 of file gtimer.cpp.
1.8.9.1