Public Member Functions |
| MamaTimer (void) |
virtual | ~MamaTimer (void) |
virtual void | create (MamaQueue *queue, MamaTimerCallback *callback, mama_f64_t interval, void *closure=NULL) |
| Create a repeating timer.
|
virtual void | destroy () |
| Destroy (stop) the timer.
|
virtual bool | isActive () const |
| Return whether the timer is active.
|
virtual void | reset () |
| Reset the timer to the beginning of the interval.
|
virtual void | setInterval (mama_f64_t intervalSeconds) |
| Set the timer to use a different interval (and reset to the beginning of that interval).
|
virtual mama_f64_t | getInterval () const |
| Get the current timer interval.
|
virtual MamaTimerCallback * | getCallback () const |
| Return the callback for the timer.
|
virtual void * | getClosure () const |
| Return the closure for the timer.
|
mamaTimer | getCValue () |
const mamaTimer | getCValue () const |
A repeating timer.
The callback will be repeatedly called at the specified interval until the timer is destroyed. To restart the timer after destroying it if destroy(), use create(). To reset the timer to the beginning of the given interval, use reset(). To set the timer to a different interval, use setInterval().
The MAMA timer relies on underlying middleware so its resolution is also dependent on the middleware.