Haka
|
Go to the source code of this file.
Data Structures | |
struct | time_realm |
Typedefs | |
typedef void(* | timer_callback) (int count, void *data) |
Enumerations |
Functions | |
bool | time_realm_initialize (struct time_realm *realm, enum time_realm_mode mode) |
bool | time_realm_destroy (struct time_realm *realm) |
void | time_realm_update_and_check (struct time_realm *realm, const struct time *value) |
const struct time * | time_realm_current_time (struct time_realm *realm) |
struct timer * | time_realm_timer (struct time_realm *realm, timer_callback callback, void *user) |
bool | time_realm_check (struct time_realm *realm) |
bool | timer_init_thread () |
void | timer_destroy (struct timer *timer) |
bool | timer_once (struct timer *timer, struct time *delay) |
bool | timer_repeat (struct timer *timer, struct time *delay) |
bool | timer_stop (struct timer *timer) |
Timer functions.
typedef void(* timer_callback) (int count, void *data) |
Opaque timer structure. Timer callback called whenever a timer triggers.
enum time_realm_mode |
Timer mode.
bool time_realm_check | ( | struct time_realm * | realm | ) |
Check and execute timer callbacks.
const struct time* time_realm_current_time | ( | struct time_realm * | realm | ) |
Get the current local time of the time realm.
bool time_realm_destroy | ( | struct time_realm * | realm | ) |
Destroy a time realm.
bool time_realm_initialize | ( | struct time_realm * | realm, |
enum time_realm_mode | mode | ||
) |
Create a new time realm.
struct timer* time_realm_timer | ( | struct time_realm * | realm, |
timer_callback | callback, | ||
void * | user | ||
) |
Create a new timer.
void time_realm_update_and_check | ( | struct time_realm * | realm, |
const struct time * | value | ||
) |
Update the time of a time realm that is in TIMER_REALM_STATIC mode. It does also check for timer to trigger.
void timer_destroy | ( | struct timer * | timer | ) |
Destroy a timer.
bool timer_init_thread | ( | ) |
Initialize the current thread for timer support.
Start a timer to be trigger only once.
Start a timer to be repeated until it is stopped or destroyed.
bool timer_stop | ( | struct timer * | timer | ) |
Stop a timer.