19 #include <coil/Listener.h> 20 #include <coil/Timer.h> 21 #include <coil/Time.h> 32 : m_interval(interval), m_running(false)
123 for (
size_t i(0), len(
m_tasks.size()); i < len; ++i)
126 if (
m_tasks[i].remains.sign() <= 0)
145 for (
size_t i(0), len(
m_tasks.size()); i < len; ++i)
147 if (
m_tasks[i].listener == listener)
168 std::vector<Task>::iterator it;
171 for (
size_t i(0), len(
m_tasks.size()); i < len; ++i, ++it)
unsigned int sleep(unsigned int seconds)
Stop a processing at specified second time.
std::vector< Task > m_tasks
ListenerId registerListener(ListenerBase *listener, TimeValue tm)
Register listener.
virtual int wait(void)
Waiting for the thread terminate.
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.
virtual void activate()
Create a thread.
Common Object Interface Layer.