#include <MamaTimer.h>
Name | |
---|---|
MamaTimer(void ) | |
virtual | ~MamaTimer(void ) |
virtual void | create(MamaQueue * queue, MamaTimerCallback * callback, mama_f64_t interval, void * closure =NULL) |
virtual void | destroy() |
virtual bool | isActive() const |
virtual void | reset() |
virtual void | setInterval(mama_f64_t intervalSeconds) |
virtual mama_f64_t | getInterval() const |
virtual MamaTimerCallback * | getCallback() const |
virtual void * | getClosure() const |
mamaTimer | getCValue() |
const mamaTimer | getCValue() const |
class Wombat::MamaTimer;
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.
MamaTimer(
void
)
virtual ~MamaTimer(
void
)
virtual void create(
MamaQueue * queue,
MamaTimerCallback * callback,
mama_f64_t interval,
void * closure =NULL
)
Parameters:
Create a repeating timer. The interval is in seconds.
The queue is the queue from which the timer event will be dispatched.
virtual void destroy()
Destroy (stop) the timer.
This function must be called from the same thread dispatching on the associated event queue unless both the default queue and dispatch queue are not actively dispatching.
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.
Return the callback for the timer.
virtual void * getClosure() const
Return: the closure.
Return the closure for the timer.
mamaTimer getCValue()
const mamaTimer getCValue() const
Updated on 2023-03-31 at 15:29:26 +0100