17 typedef struct timeout tor_timer_t;
18 typedef void (*timer_cb_fn_t)(tor_timer_t *,
void *,
20 tor_timer_t *
timer_new(timer_cb_fn_t cb,
void *arg);
21 void timer_set_cb(tor_timer_t *t, timer_cb_fn_t cb,
void *arg);
23 timer_cb_fn_t *cb_out,
void **arg_out);
27 #define timer_free(t) FREE_AND_NULL(tor_timer_t, timer_free_, (t))
32 #ifdef TOR_TIMERS_PRIVATE
Macros to implement mocking and selective exposure for the test code.
STATIC void timers_run_pending(void)
void timer_set_cb(tor_timer_t *t, timer_cb_fn_t cb, void *arg)
void timer_get_cb(const tor_timer_t *t, timer_cb_fn_t *cb_out, void **arg_out)
void timers_shutdown(void)
void timers_initialize(void)
void timer_schedule(tor_timer_t *t, const struct timeval *delay)
tor_timer_t * timer_new(timer_cb_fn_t cb, void *arg)
void timer_disable(tor_timer_t *t)
void timer_free_(tor_timer_t *t)