#include <timer-handler.h>
Inheritance diagram for TimerHandler:


Definition at line 79 of file timer-handler.h.
Public Types | |
| enum | TimerStatus { TIMER_IDLE, TIMER_PENDING, TIMER_HANDLING } |
Public Member Functions | |
| void | cancel () |
| void | force_cancel () |
| void | resched (double delay) |
| void | sched (double delay) |
| int | status () |
| TimerHandler () | |
Protected Member Functions | |
| virtual void | expire (Event *)=0 |
| virtual void | handle (Event *) |
Protected Attributes | |
| Event | event_ |
| int | status_ |
Private Member Functions | |
| void | _cancel () |
| void | _sched (double delay) |
|
|
Definition at line 94 of file timer-handler.h. 00094 { TIMER_IDLE, TIMER_PENDING, TIMER_HANDLING };
|
|
|
Definition at line 81 of file timer-handler.h. 00081 : status_(TIMER_IDLE) { }
|
|
|
Definition at line 109 of file timer-handler.h. References Scheduler::cancel(), event_, and Scheduler::instance(). Referenced by cancel(), force_cancel(), and resched(). 00109 { 00110 (void)Scheduler::instance().cancel(&event_); 00111 // no need to free event_ since it's statically allocated 00112 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 106 of file timer-handler.h. References event_, Scheduler::instance(), and Scheduler::schedule(). Referenced by resched(), and sched(). 00106 { 00107 (void)Scheduler::instance().schedule(this, &event_, delay); 00108 }
Here is the call graph for this function: ![]() |
|
|
|
|
|
Implements Handler. Reimplemented in EmpFtpTrafSession, EmpWebPage, EmpWebTrafSession, HBTimer, WebPage, and WebTrafSession. Definition at line 94 of file timer-handler.cc. References abort(), expire(), status_, TIMER_HANDLING, TIMER_IDLE, and TIMER_PENDING. Referenced by WebTrafSession::handle(), WebPage::handle(), HBTimer::handle(), EmpWebTrafSession::handle(), EmpWebPage::handle(), and EmpFtpTrafSession::handle(). 00095 { 00096 if (status_ != TIMER_PENDING) // sanity check 00097 abort(); 00098 status_ = TIMER_HANDLING; 00099 expire(e); 00100 // if it wasn't rescheduled, it's done 00101 if (status_ == TIMER_HANDLING) 00102 status_ = TIMER_IDLE; 00103 }
Here is the call graph for this function: ![]() |
|
|
|
|
|
Definition at line 103 of file timer-handler.h. Referenced by _cancel(), _sched(), WebPage::start(), and EmpWebPage::start(). |
|
|
Definition at line 102 of file timer-handler.h. Referenced by SmacTimer::busy(), cancel(), SmacCsTimer::checkToCancel(), force_cancel(), handle(), resched(), sched(), SmacCounterTimer::sched(), WebPage::start(), EmpWebPage::start(), status(), EmpFtpTrafSession::~EmpFtpTrafSession(), EmpWebTrafSession::~EmpWebTrafSession(), and WebTrafSession::~WebTrafSession(). |
1.4.6