MCPcopy Index your code
hub / github.com/ElementsProject/lightning / new_reltimer_

Function new_reltimer_

common/timeout.c:17–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17struct oneshot *new_reltimer_(struct timers *timers,
18 const tal_t *ctx,
19 struct timerel relexpiry,
20 void (*cb)(void *), void *arg)
21{
22 struct oneshot *t = tal(ctx, struct oneshot);
23
24 t->cb = cb;
25 t->arg = arg;
26 t->timers = timers;
27 timer_init(&t->timer);
28 timer_addrel(timers, &t->timer, relexpiry);
29 tal_add_destructor(t, destroy_timer);
30
31 return t;
32}
33
34struct oneshot *new_abstimer_(struct timers *timers,
35 const tal_t *ctx,

Callers

nothing calls this directly

Calls 2

timer_initFunction · 0.85
timer_addrelFunction · 0.85

Tested by

no test coverage detected