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

Function grains_to_time

ccan/ccan/timer/timer.c:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44static struct timemono grains_to_time(uint64_t grains)
45{
46 struct timemono t;
47
48 t.ts.tv_sec = grains / (1000000000 / TIMER_GRANULARITY);
49 t.ts.tv_nsec = (grains % (1000000000 / TIMER_GRANULARITY))
50 * TIMER_GRANULARITY;
51 return t;
52}
53
54void timers_init(struct timers *timers, struct timemono start)
55{

Callers 4

timer_earliestFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 3

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68