|
libassa
3.5.1
|
#include <Timer.h>
Public Member Functions | |
| Timer () | |
| Default constructor. More... | |
| Timer (const EventHandler *eh_, const TimeVal &tm_, const TimeVal &delta_, const std::string &name_) | |
| Constructor used by the TimerQueue. More... | |
| Timer (const Timer &t_) | |
| Copy constructor. More... | |
| ~Timer () | |
| Destructor: do-nothing. More... | |
| Timer & | operator= (const Timer &t_) |
| Assignment operator. More... | |
| bool | operator< (const Timer &t_) const |
| Less-that by time. More... | |
| bool | operator== (const Timer &t_) const |
| Equal by time. More... | |
| EventHandler * | getHandler () const |
| Get EventHandler pointer. More... | |
| const TimeVal & | getExpirationTime () const |
| Get Expiration Time. More... | |
| const TimeVal & | getDeltaTime () const |
| Get Delta time. More... | |
| void | rescheduleExpirationTime () |
| Reschedule expiration time with Delta value. More... | |
| void | dump (void) |
| Dump contents to logfile. More... | |
| void | set_id (const std::string &id_) |
| Set Timer ID. More... | |
| std::string | get_id () const |
| Retrieve Timer ID. More... | |
Private Attributes | |
| EventHandler * | m_eh |
| Pointer to EventHandler. More... | |
| TimeVal | m_timer |
| When the timer should be triggered. More... | |
| TimeVal | m_delta |
| Absolute value used when Reactor needs to reschedule the timer. More... | |
| std::string | m_id |
| Timer's ID. More... | |
|
inline |
Default constructor.
Definition at line 110 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 118 of file Timer.h.
References trace.
|
inline |
Copy constructor.
Definition at line 127 of file Timer.h.
References trace.
|
inline |
|
inline |
Dump contents to logfile.
Definition at line 177 of file Timer.h.
References DL, ASSA::TimeVal::fmt_mm_ss_mls(), ASSA::TimeVal::fmtString(), get_id(), ASSA::EventHandler::get_id(), m_delta, m_eh, m_timer, and ASSA::REACT.
Referenced by ASSA::PriorityQueue_STLPQ< T, Compare >::dump(), and ASSA::TimerQueue::expire().
|
inline |
|
inline |
Get Delta time.
Definition at line 74 of file Timer.h.
References m_delta.
|
inline |
Get Expiration Time.
Definition at line 71 of file Timer.h.
References m_timer.
Referenced by ASSA::TimerQueue::expire().
|
inline |
Get EventHandler pointer.
Definition at line 68 of file Timer.h.
References m_eh.
Referenced by ASSA::TimerQueue::expire(), and ASSA::PriorityQueue_STLPQ< T, Compare >::remove().
|
inline |
|
inline |
|
inline |
Reschedule expiration time with Delta value.
Definition at line 169 of file Timer.h.
References ASSA::TimeVal::gettimeofday(), m_delta, and m_timer.
|
inline |
|
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().
1.8.8