Go to the source code of this file.
Data Structures | |
struct | as_timer |
struct | as_timer_hooks |
Functions | |
int | as_timer_destroy (as_timer *timer) |
as_timer * | as_timer_init (as_timer *timer, void *source, const as_timer_hooks *hooks) |
as_timer * | as_timer_new (void *source, const as_timer_hooks *hooks) |
static void * | as_timer_source (const as_timer *tt) |
bool | as_timer_timedout (const as_timer *timer) |
uint64_t | as_timer_timeslice (const as_timer *timer) |
int as_timer_destroy | ( | as_timer * | timer | ) |
Release resources associated with the timer. Calls timer->destroy. If success and if this is a heap allocated timer, then it will be freed.
as_timer* as_timer_init | ( | as_timer * | timer, |
void * | source, | ||
const as_timer_hooks * | hooks | ||
) |
Initialize a stack allocated timer
as_timer* as_timer_new | ( | void * | source, |
const as_timer_hooks * | hooks | ||
) |
Heap allocate and initialize a timer
|
inlinestatic |
Definition at line 68 of file as_timer.h.
References as_timer::source.
bool as_timer_timedout | ( | const as_timer * | timer | ) |
true if timer has timedout
uint64_t as_timer_timeslice | ( | const as_timer * | timer | ) |
returns timeslice assigned for this timer