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

Function level_max_time

ccan/ccan/timer/timer.c:158–163  ·  view source on GitHub ↗

Maximum time covered by levels 0..@level (from base); saturates * once the range exceeds the representable 64 bits. */

Source from the content-addressed store, hash-verified

156/* Maximum time covered by levels 0..@level (from base); saturates
157 * once the range exceeds the representable 64 bits. */
158static uint64_t level_max_time(const struct timers *timers, unsigned int level)
159{
160 if ((level + 1) * TIMER_LEVEL_BITS >= 64)
161 return -1ULL;
162 return timers->base + (1ULL << ((level+1)*TIMER_LEVEL_BITS)) - 1;
163}
164
165static void add_level(struct timers *timers, unsigned int level)
166{

Callers 2

add_levelFunction · 0.85
timer_fast_forwardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected