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

Function timemono_sub

ccan/ccan/time/time.h:455–461  ·  view source on GitHub ↗

* timemono_sub - subtract a relative time from a monotonic time * @mono: the monotonic time. * @rel: the relative time. * * This returns a well formed struct timemono of @mono - @rel. * * Example: * // We do one every second. * static struct timemono previous_time(void) * { * return timemono_sub(time_mono(), time_from_msec(1000)); * } */

Source from the content-addressed store, hash-verified

453 * }
454 */
455static inline struct timemono timemono_sub(struct timemono mono, struct timerel rel)
456{
457 struct timemono t;
458
459 t.ts = time_sub_(mono.ts, rel.ts);
460 return t;
461}
462
463
464static inline struct timespec time_add_(struct timespec a, struct timespec b)

Callers 2

send_pingFunction · 0.85
mainFunction · 0.85

Calls 1

time_sub_Function · 0.85

Tested by 1

mainFunction · 0.68