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

Function timemono_eq

ccan/ccan/time/time.h:313–317  ·  view source on GitHub ↗

* timemono_eq - is a equal to b? * @a: one monotonic time. * @b: another monotonic time. * * Example: * #include * #include * * // Can we fork in under a nanosecond? * static bool fast_fork(void) * { * struct timemono start = time_mono(); * if (fork() != 0) { * exit(0); * } * wait(NULL); * return timemono_eq(start, time_mono()); * } */

Source from the content-addressed store, hash-verified

311 * }
312 */
313static inline bool timemono_eq(struct timemono a, struct timemono b)
314{
315 return TIMEMONO_CHECK(a).ts.tv_sec == TIMEMONO_CHECK(b).ts.tv_sec
316 && a.ts.tv_nsec == b.ts.tv_nsec;
317}
318
319/**
320 * timerel_eq - is a equal to b?

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68