22 #include <coil/TimeValue.h> 23 #include <coil/Listener.h> 24 #include <coil/Mutex.h> 25 #include <coil/Guard.h> 26 #include <coil/Task.h> 119 virtual int open(
void *args);
140 virtual int svc(
void);
254 template <
class ListenerClass>
256 void (ListenerClass::*cbf)(),
Task(ListenerBase *l, TimeValue p)
ListenerBase * ListenerId
std::vector< Task > m_tasks
ListenerId registerListener(ListenerBase *listener, TimeValue tm)
Register listener.
coil::Guard< Mutex > Guard
ListenerId registerListenerFunc(void(*cbf)(), TimeValue tm)
Register listener.
ListenerId registerListenerObj(ListenerClass *obj, void(ListenerClass::*cbf)(), TimeValue tm)
Register listener.
void stop()
Stop Timer task.
void invoke()
Invoke Timer task.
virtual ~Timer()
Destructor.
void start()
Start Timer task.
Timer(TimeValue &interval)
Constructor.
bool unregisterListener(ListenerId id)
Unregister listener.
virtual int svc(void)
Thread execution function for Timer.
virtual int open(void *args)
Create thread for Timer.
Common Object Interface Layer.