|
Tor 0.5.0.0-alpha-dev
|
Go to the source code of this file.
Macros | |
| #define | timer_free(t) FREE_AND_NULL(tor_timer_t, timer_free_, (t)) |
Typedefs | |
| typedef void(* | timer_cb_fn_t) (tor_timer_t *, void *, const struct monotime_t *) |
Functions | |
| tor_timer_t * | timer_new (timer_cb_fn_t cb, void *arg) |
| 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 | timer_schedule (tor_timer_t *t, const struct timeval *delay) |
| void | timer_disable (tor_timer_t *t) |
| void | timer_free_ (tor_timer_t *t) |
| void | timers_initialize (void) |
| void | timers_shutdown (void) |
| #define timer_free | ( | t | ) | FREE_AND_NULL(tor_timer_t, timer_free_, (t)) |
| typedef void(* timer_cb_fn_t) (tor_timer_t *, void *, const struct monotime_t *) |
| void timer_disable | ( | tor_timer_t * | t | ) |
Cancel the timer t if it is currently scheduled. (It's okay to call this on an unscheduled timer.
Definition at line 326 of file timers.c.
Referenced by circpad_machine_remove_token(), circpad_machine_schedule_padding(), and circpad_machine_spec_transition().
| void timer_free_ | ( | tor_timer_t * | t | ) |
| void timer_get_cb | ( | const tor_timer_t * | t, |
| timer_cb_fn_t * | cb_out, | ||
| void ** | arg_out | ||
| ) |
| tor_timer_t * timer_new | ( | timer_cb_fn_t | cb, |
| void * | arg | ||
| ) |
Allocate and return a new timer, with given callback and argument.
Definition at line 250 of file timers.c.
Referenced by channelpadding_schedule_padding(), and circpad_machine_schedule_padding().
| void timer_schedule | ( | tor_timer_t * | t, |
| const struct timeval * | tv | ||
| ) |
Schedule the timer t to fire at the current time plus a delay of delay microseconds. All times are relative to monotime_get().
Definition at line 301 of file timers.c.
Referenced by channelpadding_schedule_padding(), and circpad_machine_schedule_padding().
| void timer_set_cb | ( | tor_timer_t * | t, |
| timer_cb_fn_t | cb, | ||
| void * | arg | ||
| ) |
Change the callback and argument associated with a timer t.
Definition at line 276 of file timers.c.
Referenced by channelpadding_schedule_padding(), circpad_machine_schedule_padding(), and timer_new().
| void timers_initialize | ( | void | ) |
| void timers_shutdown | ( | void | ) |
Release all storage held in the timers subsystem. Does not fire timers.
Definition at line 234 of file timers.c.
Referenced by tor_cleanup().