MCPcopy Create free account
hub / github.com/ElementsProject/lightning / new_timer

Function new_timer

plugins/libplugin.c:1806–1821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1804}
1805
1806static struct plugin_timer *new_timer(const tal_t *ctx,
1807 struct plugin *p,
1808 const char *id TAKES,
1809 struct timerel t,
1810 struct command_result *(*cb)(struct command *, void *),
1811 void *cb_arg)
1812{
1813 struct plugin_timer *timer = notleak(tal(ctx, struct plugin_timer));
1814 timer->id = tal_strdup(timer, id);
1815 timer->cb = cb;
1816 timer->cb_arg = cb_arg;
1817 timer_init(&timer->timer);
1818 timer_addrel(&p->timers, &timer->timer, t);
1819 tal_add_destructor2(timer, destroy_plugin_timer, p);
1820 return timer;
1821}
1822
1823struct plugin_timer *global_timer_(struct plugin *p,
1824 struct timerel t,

Callers 2

global_timer_Function · 0.70
command_timer_Function · 0.70

Calls 2

timer_initFunction · 0.85
timer_addrelFunction · 0.85

Tested by

no test coverage detected