libosmocore 1.13.1.1-afb4 Osmocom core library

Functions | Variables
timer.c File Reference
Osmocom timers
`#include <assert.h>`
`#include <string.h>`
`#include <limits.h>`
`#include "config.h"`
`#include <osmocom/core/timer.h>`
`#include <osmocom/core/timer_compat.h>`
`#include <osmocom/core/linuxlist.h>`

## Functions
static void | __add_timer (struct osmo_timer_list *timer)
void | osmo_timer_setup (struct osmo_timer_list *timer, void(*cb)(void *data), void *data)
| set up timer callback and data More...
void | osmo_timer_add (struct osmo_timer_list *timer)
| add a new timer to the timer management More...
void | osmo_timer_schedule (struct osmo_timer_list *timer, int seconds, int microseconds)
| schedule a timer at a given future relative time More...
void | osmo_timer_del (struct osmo_timer_list *timer)
| delete a timer from timer management More...
int | osmo_timer_pending (const struct osmo_timer_list *timer)
| check if given timer is still pending More...
int | osmo_timer_remaining (const struct osmo_timer_list *timer, const struct timeval *now, struct timeval *remaining)
| compute the remaining time of a timer More...
struct timeval * | osmo_timers_nearest (void)
| Determine time between now and the nearest timer. More...
int | osmo_timers_nearest_ms (void)
| Determine time between now and the nearest timer in milliseconds. More...
static void | update_nearest (struct timeval *cand, struct timeval *current)
void | osmo_timers_prepare (void)
| Find the nearest time and update nearest_p. More...
int | osmo_timers_update (void)
| fire all timers... and remove them More...
int | osmo_timers_check (void)
| Check how many timers we have in the system. More...

## Variables
static __thread struct timeval | nearest
static __thread struct timeval * | nearest_p
static __thread struct rb_root | timer_root = RB_ROOT