34typedef struct as_timer_hooks_s {
39 int (* destroy)(
struct as_timer_s *);
40 bool (* timedout)(
const struct as_timer_s *);
41 uint64_t (* timeslice)(
const struct as_timer_s *);
47typedef struct as_timer_s {
69 return (tt ? tt->
source : NULL);
as_timer * as_timer_init(as_timer *timer, void *source, const as_timer_hooks *hooks)
static void * as_timer_source(const as_timer *tt)
uint64_t as_timer_timeslice(const as_timer *timer)
as_timer * as_timer_new(void *source, const as_timer_hooks *hooks)
int as_timer_destroy(as_timer *timer)
bool as_timer_timedout(const as_timer *timer)
const as_timer_hooks * hooks