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

Function new_timer

plugins/libplugin.c:1796–1811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1794}
1795
1796static struct plugin_timer *new_timer(const tal_t *ctx,
1797 struct plugin *p,
1798 const char *id TAKES,
1799 struct timerel t,
1800 struct command_result *(*cb)(struct command *, void *),
1801 void *cb_arg)
1802{
1803 struct plugin_timer *timer = notleak(tal(ctx, struct plugin_timer));
1804 timer->id = tal_strdup(timer, id);
1805 timer->cb = cb;
1806 timer->cb_arg = cb_arg;
1807 timer_init(&timer->timer);
1808 timer_addrel(&p->timers, &timer->timer, t);
1809 tal_add_destructor2(timer, destroy_plugin_timer, p);
1810 return timer;
1811}
1812
1813struct plugin_timer *global_timer_(struct plugin *p,
1814 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