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

Function timer_add_raw

ccan/ccan/timer/timer.c:75–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static void timer_add_raw(struct timers *timers, struct timer *t)
76{
77 struct list_head *l;
78 unsigned int level = level_of(timers, t->time);
79 uint64_t *first;
80
81 if (!timers->level[level]) {
82 l = &timers->far;
83 first = &timers->firsts[ARRAY_SIZE(timers->level)];
84 } else {
85 int off = (t->time >> (level*TIMER_LEVEL_BITS)) & (PER_LEVEL-1);
86 l = &timers->level[level]->list[off];
87 first = &timers->firsts[level];
88 }
89
90 list_add_tail(l, &t->list);
91 if (t->time < *first)
92 *first = t->time;
93}
94
95void timer_init(struct timer *t)
96{

Callers 4

timer_addrelFunction · 0.85
timer_addmonoFunction · 0.85
add_levelFunction · 0.85
timer_fast_forwardFunction · 0.85

Calls 1

level_ofFunction · 0.85

Tested by

no test coverage detected