|
libassa 3.5.1
|
#include <Timer.h>
Public Member Functions | |
| Timer () | |
| Default constructor. | |
| Timer (const EventHandler *eh_, const TimeVal &tm_, const TimeVal &delta_, const std::string &name_) | |
| Constructor used by the TimerQueue. | |
| Timer (const Timer &t_) | |
| Copy constructor. | |
| ~Timer () | |
| Destructor: do-nothing. | |
| Timer & | operator= (const Timer &t_) |
| Assignment operator. | |
| bool | operator< (const Timer &t_) const |
| Less-that by time. | |
| bool | operator== (const Timer &t_) const |
| Equal by time. | |
| EventHandler * | getHandler () const |
| Get EventHandler pointer. | |
| const TimeVal & | getExpirationTime () const |
| Get Expiration Time. | |
| const TimeVal & | getDeltaTime () const |
| Get Delta time. | |
| void | rescheduleExpirationTime () |
| Reschedule expiration time with Delta value. | |
| void | dump (void) |
| Dump contents to logfile. | |
| void | set_id (const std::string &id_) |
| Set Timer ID. | |
| std::string | get_id () const |
| Retrieve Timer ID. | |
Private Attributes | |
| EventHandler * | m_eh |
| Pointer to EventHandler. | |
| TimeVal | m_timer |
| When the timer should be triggered. | |
| TimeVal | m_delta |
| Absolute value used when Reactor needs to reschedule the timer. | |
| std::string | m_id |
| Timer's ID. | |
|
inline |
Default constructor.
Definition at line 109 of file Timer.h.
References trace.
|
inline |
Constructor used by the TimerQueue.
| eh_ | EventHandler to call upon timeout |
| tm_ | Time of the day to expire the timer. |
| delta_ | Absolute timeout value. |
| name_ | Timer name |
Definition at line 117 of file Timer.h.
References trace.
|
inline |
Dump contents to logfile.
Definition at line 176 of file Timer.h.
References DL, ASSA::TimeVal::fmt_mm_ss_mls(), ASSA::TimeVal::fmtString(), ASSA::EventHandler::get_id(), get_id(), m_delta, m_eh, m_timer, and ASSA::REACT.
|
inline |
|
inline |
|
inline |
Reschedule expiration time with Delta value.
Definition at line 168 of file Timer.h.
References ASSA::TimeVal::gettimeofday(), m_delta, and m_timer.
|
private |
Absolute value used when Reactor needs to reschedule the timer.
Definition at line 99 of file Timer.h.
Referenced by dump(), getDeltaTime(), operator=(), and rescheduleExpirationTime().
|
private |
Pointer to EventHandler.
Definition at line 93 of file Timer.h.
Referenced by dump(), getHandler(), and operator=().
|
private |
|
private |
When the timer should be triggered.
Definition at line 96 of file Timer.h.
Referenced by dump(), getExpirationTime(), operator<(), operator=(), operator==(), and rescheduleExpirationTime().