2 * Copyright (C) 2007 iptelorg GmbH
4 * This file is part of Kamailio, a free SIP server.
6 * Kamailio is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version
11 * Kamailio is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 * \brief Kamailio core :: local timer routines
27 * WARNING: this should be used only from within the same process.
28 * The local timers are not multi-process or multi-thread safe
29 * (there are no locks)
33 #ifndef _local_timer_h
34 #define _local_timer_h
36 #include "timer_ticks.h"
37 #include "timer_funcs.h"
41 /* private timer information */
42 ticks_t prev_ticks; /* last time we ran the timer */
43 struct timer_lists timer_lst; /* actual timer lists */
47 #define local_timer_init(tl, fun, param, flgs) timer_init(tl, fun, param, flgs)
49 #define local_timer_reinit(tl) timer_reinit((tl))
51 int init_local_timer(struct local_timer *lt_handle, ticks_t crt_ticks);
52 void destroy_local_timer(struct local_timer* lt_handle);
54 int local_timer_add(struct local_timer* h, struct timer_ln* tl, ticks_t delta,
57 void local_timer_del(struct local_timer* h, struct timer_ln* tl);
58 void local_timer_run(struct local_timer* lt, ticks_t crt_ticks);
60 #endif /* _local_timer_h */