#include <timer.h>
Inheritance diagram for Timer::

Public Methods | |
| Timer (bool doRandom, CallBackObj *toCall) | |
| Initialize the timer, and callback to "toCall" every time slice. More... | |
| virtual | ~Timer () |
| void | Disable () |
| Turn timer device off, so it doesn't generate any more interrupts. More... | |
Private Methods | |
| void | CallBack () |
| called internally when the hardware timer generates an interrupt. More... | |
| void | SetInterrupt () |
| cause an interrupt to occur in the the future after a fixed or random delay. More... | |
Private Attributes | |
| bool | randomize |
| set if we need to use a random timeout delay. More... | |
| CallBackObj* | callPeriodically |
| call this every TimerTicks time units. More... | |
| bool | disable |
| turn off the timer device after next interrupt. More... | |
Definition at line 28 of file timer.h.
|
|
Initialize the timer, and callback to "toCall" every time slice. Timer::Timer Initialize a hardware timer device. Save the place to call on each interrupt, and then arrange for the timer to start generating interrupts. "doRandom" -- if true, arrange for the interrupts to occur at random, instead of fixed, intervals. "toCall" is the interrupt handler to call when the timer expires. |
|
|
|
|
|
called internally when the hardware timer generates an interrupt. Timer::CallBack Routine called when interrupt is generated by the hardware timer device. Schedule the next interrupt, and invoke the interrupt handler. Reimplemented from CallBackObj. |
|
|
Turn timer device off, so it doesn't generate any more interrupts.
Definition at line 35 of file timer.h. Referenced by Alarm::CallBack().
|
|
|
cause an interrupt to occur in the the future after a fixed or random delay. Timer::SetInterrupt Cause a timer interrupt to occur in the future, unless future interrupts have been disabled. The delay is either fixed or random. Definition at line 70 of file timer.cc. Referenced by CallBack(), and Timer().
|
|
|
call this every TimerTicks time units.
|
|
|
turn off the timer device after next interrupt.
|
|
|
set if we need to use a random timeout delay.
|
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001