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

Function time_to_grains

ccan/ccan/timer/timer.c:38–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38static uint64_t time_to_grains(struct timemono t)
39{
40 return t.ts.tv_sec * ((uint64_t)1000000000 / TIMER_GRANULARITY)
41 + (t.ts.tv_nsec / TIMER_GRANULARITY);
42}
43
44static struct timemono grains_to_time(uint64_t grains)
45{

Callers 4

timers_initFunction · 0.85
timer_addrelFunction · 0.85
timer_addmonoFunction · 0.85
timers_expireFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected