#include <TimerHandler.h>

Definition at line 11 of file TimerHandler.h.
Public Member Functions | |
| TimerHandler (std::string desc="") | |
| Timers are constructed with a description string, so you can ask them what timer they are. | |
| void | fire () |
| called by the scheduler to fire the timer | |
| uint64_t | schedule (uint64_t time, bool abs=false, bool align=false) |
| call this on the timer handler to schedule it with the scheduler | |
| void | cancel () |
| used to cancel a timer. | |
| const std::string & | getDescription () const |
| returns the description of the timer | |
| unsigned | getId () const |
| returns the unique timer id | |
| bool | isScheduled () const |
| returns true if the timer is currently scheduled | |
| bool | isRunning () const |
| returns true if the timer is scheduled or trying to fire (acquiring a lock) | |
Protected Member Functions | |
| virtual void | expire ()=0 |
| void | clearRunning () |
| call this during expire to indicate that the timer is firing (lock acquired) and is ready to be scheduled again. | |
| uint64_t TimerHandler::schedule | ( | uint64_t | time, | |
| bool | abs = false, |
|||
| bool | align = false | |||
| ) |
call this on the timer handler to schedule it with the scheduler
| time | the time to schedule in microseconds | |
| abs | true means time is absolute, false means it is now+time | |
| align | if true the timer will try to schedule itself for a second boundary (no parts of a second) |
Definition at line 18 of file TimerHandler.cc.
References Scheduler::schedule(), and TimeUtil::timeu().
Referenced by VMRSSLimit::expire(), SwapMonitor::expire(), LoadMonitor::expire(), HiResLoadMonitor::expire(), LoadMonitor::runLoadMonitor(), SwapMonitor::runSwapMonitor(), VMRSSLimit::runVMRSSLimit(), and HiResLoadMonitor::start().
| virtual void TimerHandler::expire | ( | ) | [protected, pure virtual] |
implemented by each timer subclass with the action to take when the timer fires
Implemented in HiResLoadMonitor, LoadMonitor, SwapMonitor, and VMRSSLimit.
Referenced by fire().
1.5.5