1#ifndef COMPA_TIMERTHREAD_HPP
2#define COMPA_TIMERTHREAD_HPP
Stores head and size of free list, as well as mutex for protection.
Linked list (no protection).
Manage a threadpool (for internal use only).
int TimerThreadShutdown(TimerThread *timer)
Shutdown the timer thread.
pthread_mutex_t mutex
[in]
pthread_cond_t condition
[in]
int TimerThreadInit(TimerThread *timer, ThreadPool *tp)
Initializes and starts timer thread.
int TimerThreadSchedule(TimerThread *timer, time_t timeout, TimeoutType type, ThreadPoolJob *job, Duration duration, int *id)
Schedules an event to run at a specified time.
int TimerThreadRemove(TimerThread *timer, int id, ThreadPoolJob *out)
Removes an event from the timer Q.
TimeoutType
Timeout Types.
@ ABS_SEC
seconds from Jan 1, 1970.
@ REL_SEC
seconds from current time.
A timer thread that allows the scheduling of a job to run at a specified time in the future.