MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / register_timer

Function register_timer

timer.c:251–264  ·  view source on GitHub ↗

register a periodic timer; * ret: <0 on error * Hint: if you need it in a module, register it from mod_init or it * won't work otherwise*/

Source from the content-addressed store, hash-verified

249 * Hint: if you need it in a module, register it from mod_init or it
250 * won't work otherwise*/
251int register_timer(char *label, timer_function f, void* param,
252 unsigned int interval, unsigned short flags)
253{
254 struct os_timer* t;
255
256 flags = flags & (~TIMER_FLAG_IS_UTIMER); /* just to be sure */
257 t = new_os_timer( label, flags, f, param, interval);
258 if (t==NULL)
259 return E_OUT_OF_MEM;
260 /* insert it into the timer list*/
261 t->next = timer_list;
262 timer_list = t;
263 return t->id;
264}
265
266
267int register_utimer(char *label, utimer_function f, void* param,

Callers 15

init_black_listsFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
qr_initFunction · 0.85
mod_initFunction · 0.85

Calls 1

new_os_timerFunction · 0.85

Tested by

no test coverage detected