Timed callback function pointer API version 20110324. More...
#include "timerapi.h"
Data Fields | |
hqn_timer_t *(* | hqn_timer_create )(unsigned int first, unsigned int repeat, hqn_timer_callback_fn *callback, void *data) |
Create a timer to call a function on a timed schedule. More... | |
void(* | hqn_timer_reset )(hqn_timer_t *timer, unsigned int next, unsigned int repeat) |
Set new delay and period for calling a timed callback. More... | |
void(* | hqn_timer_destroy )(hqn_timer_t *timer) |
Destroy a timer event. More... | |
Timed callback function pointer API version 20110324.
hqn_timer_t*( * SW_TIMER_20110324::hqn_timer_create) (unsigned int first, unsigned int repeat, hqn_timer_callback_fn *callback, void *data) |
Create a timer to call a function on a timed schedule.
[in] | first | Time before the first call, in milliseconds. If the time before the first call is zero then the callback will be called immediately. |
[in] | repeat | Time between subsequent calls, in milliseconds. If the time between subsequent calls is zero then the callback will be called just once. |
[in] | callback | Function to be called when the timer expires, with data passed to the function. |
[in] | data | Pointer passed to the callback function. |
NULL
if the timer could not be created.void( * SW_TIMER_20110324::hqn_timer_destroy) (hqn_timer_t *timer) |
Destroy a timer event.
After a call to this function a timed callback will not happen, even if it has not yet been called.
[in] | timer | Handle of the timer to destroy. |
void( * SW_TIMER_20110324::hqn_timer_reset) (hqn_timer_t *timer, unsigned int next, unsigned int repeat) |
Set new delay and period for calling a timed callback.
[in] | timer | Handle of the timer to reset. |
[in] | next | Time delay to the next call, in milliseconds. |
[in] | repeat | Time delay between subsequent calls, in milliseconds. |