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

Function timerel_eq

ccan/ccan/time/time.h:307–311  ·  view source on GitHub ↗

* timerel_eq - is a equal to b? * @a: one relative time. * @b: another relative time. * * Example: * #include * #include * * // Can we fork in under a nanosecond? * static bool fast_fork(void) * { * struct timeabs start = time_now(); * struct timerel diff, zero = { .ts = { 0, 0 } }; * if (fork() != 0) { * exit(0); * } * wait(NULL); * diff = time_

Source from the content-addressed store, hash-verified

305 * }
306 */
307static inline bool timerel_eq(struct timerel a, struct timerel b)
308{
309 return TIMEREL_CHECK(a).ts.tv_sec == TIMEREL_CHECK(b).ts.tv_sec
310 && a.ts.tv_nsec == b.ts.tv_nsec;
311}
312
313static inline struct timespec time_sub_(struct timespec recent,
314 struct timespec old)

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 2

mainFunction · 0.68
mainFunction · 0.68