|
libcmutils 0.6.5
Multi-platform C99 utility library
|
Timer object for scheduling tasks. More...
Data Fields | |
| CMUTIL_TimerTask *(* | ScheduleAtTime )(CMUTIL_Timer *timer, struct timeval *attime, CMProcCB proc, void *param) |
| Schedule a task to run at a specific time. | |
| CMUTIL_TimerTask *(* | ScheduleDelay )(CMUTIL_Timer *timer, long delay, CMProcCB proc, void *param) |
| Schedule a task to run after a specified delay. | |
| CMUTIL_TimerTask *(* | ScheduleAtRepeat )(CMUTIL_Timer *timer, struct timeval *first, long period, CMBool elapse_skip, CMProcCB proc, void *param) |
| Schedule a task to run repeatedly at fixed intervals, starting at a specific time. | |
| CMUTIL_TimerTask *(* | ScheduleDelayRepeat )(CMUTIL_Timer *timer, long delay, long period, CMBool elapse_skip, CMProcCB proc, void *param) |
| Schedule a task to run repeatedly at fixed intervals, starting after a specified delay. | |
| void(* | Purge )(CMUTIL_Timer *timer) |
| Purge all scheduled tasks from the timer. | |
| void(* | Destroy )(CMUTIL_Timer *timer) |
| Destroy the timer object and free its resources. | |
Timer object for scheduling tasks.
| CMUTIL_TimerTask *(* CMUTIL_Timer::ScheduleAtTime) (CMUTIL_Timer *timer, struct timeval *attime, CMProcCB proc, void *param) |
Schedule a task to run at a specific time.
| timer | The timer object used to schedule the task. |
| attime | The absolute time at which to run the task. |
| proc | The callback function to execute when the task is run. |
| param | A user-defined parameter to pass to the callback function. |
| CMUTIL_TimerTask *(* CMUTIL_Timer::ScheduleDelay) (CMUTIL_Timer *timer, long delay, CMProcCB proc, void *param) |
Schedule a task to run after a specified delay.
| timer | The timer object used to schedule the task. |
| delay | The delay in milliseconds before the task is run. |
| proc | The callback function to execute when the task is run. |
| param | A user-defined parameter to pass to the callback function. |
| CMUTIL_TimerTask *(* CMUTIL_Timer::ScheduleAtRepeat) (CMUTIL_Timer *timer, struct timeval *first, long period, CMBool elapse_skip, CMProcCB proc, void *param) |
Schedule a task to run repeatedly at fixed intervals, starting at a specific time.
| timer | The timer object used to schedule the task. |
| first | The absolute time at which to run the first execution of the task. |
| period | The interval in milliseconds between subsequent executions of the task. |
| elapse_skip | If CMTrue, the task will skip elapsed time intervals when it is delayed. |
| proc | The callback function to execute when the task is run. |
| param | A user-defined parameter to pass to the callback function. |
| CMUTIL_TimerTask *(* CMUTIL_Timer::ScheduleDelayRepeat) (CMUTIL_Timer *timer, long delay, long period, CMBool elapse_skip, CMProcCB proc, void *param) |
Schedule a task to run repeatedly at fixed intervals, starting after a specified delay.
| timer | The timer object used to schedule the task. |
| delay | The delay in milliseconds before the first execution of the task. |
| period | The interval in milliseconds between subsequent executions of the task. |
| elapse_skip | If CMTrue, the task will skip elapsed time intervals when it is delayed. |
| proc | The callback function to execute when the task is run. |
| param | A user-defined parameter to pass to the callback function. |
| void(* CMUTIL_Timer::Purge) (CMUTIL_Timer *timer) |
Purge all scheduled tasks from the timer.
This function removes all tasks that have been scheduled on the timer, effectively clearing the task queue.
| timer | The timer object from which to purge tasks. |
| void(* CMUTIL_Timer::Destroy) (CMUTIL_Timer *timer) |
Destroy the timer object and free its resources.
This function stops the timer and releases all associated resources. Any scheduled tasks that have not yet executed will be canceled.
| timer | The timer object to be destroyed. |