/src/rtpproxy/external/libre/include/re_tmr.h
Line | Count | Source |
1 | | /** |
2 | | * @file re_tmr.h Interface to timer implementation |
3 | | * |
4 | | * Copyright (C) 2010 Creytiv.com |
5 | | */ |
6 | | |
7 | | |
8 | | /** |
9 | | * Defines the timeout handler |
10 | | * |
11 | | * @param arg Handler argument |
12 | | */ |
13 | | typedef void (tmr_h)(void *arg); |
14 | | |
15 | | /** Defines a timer */ |
16 | | struct tmr { |
17 | | struct le le; /**< Linked list element */ |
18 | | tmr_h *th; /**< Timeout handler */ |
19 | | void *arg; /**< Handler argument */ |
20 | | uint64_t jfs; /**< Jiffies for timeout */ |
21 | | }; |
22 | | |
23 | | |
24 | | void tmr_poll(struct list *tmrl); |
25 | | uint64_t tmr_jiffies(void); |
26 | | uint64_t tmr_next_timeout(struct list *tmrl); |
27 | | void tmr_debug(void); |
28 | | int tmr_status(struct re_printf *pf, void *unused); |
29 | | |
30 | | void tmr_init(struct tmr *tmr); |
31 | | void tmr_start(struct tmr *tmr, uint64_t delay, tmr_h *th, void *arg); |
32 | | void tmr_cancel(struct tmr *tmr); |
33 | | uint64_t tmr_get_expire(const struct tmr *tmr); |
34 | | |
35 | | |
36 | | /** |
37 | | * Check if the timer is running |
38 | | * |
39 | | * @param tmr Timer to check |
40 | | * |
41 | | * @return true if running, false if not running |
42 | | */ |
43 | | static inline bool tmr_isrunning(const struct tmr *tmr) |
44 | 0 | { |
45 | 0 | return tmr ? NULL != tmr->th : false; |
46 | 0 | } Unexecuted instantiation: cand.c:tmr_isrunning Unexecuted instantiation: candpair.c:tmr_isrunning Unexecuted instantiation: comp.c:tmr_isrunning Unexecuted instantiation: ctrans.c:tmr_isrunning Unexecuted instantiation: icem.c:tmr_isrunning Unexecuted instantiation: icesdp.c:tmr_isrunning Unexecuted instantiation: icestr.c:tmr_isrunning Unexecuted instantiation: rand.c:tmr_isrunning Unexecuted instantiation: rtpp_re_icesdp.c:tmr_isrunning Unexecuted instantiation: stunsrv.c:tmr_isrunning Unexecuted instantiation: util.c:tmr_isrunning Unexecuted instantiation: rtpp_ice_lite.c:tmr_isrunning |