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

Function timeabs_eq

ccan/ccan/time/time.h:253–257  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

251 * }
252 */
253static inline bool timeabs_eq(struct timeabs a, struct timeabs b)
254{
255 return TIMEABS_CHECK(a).ts.tv_sec == TIMEABS_CHECK(b).ts.tv_sec
256 && a.ts.tv_nsec == b.ts.tv_nsec;
257}
258
259/**
260 * timemono_eq - is a equal to b?

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 2

mainFunction · 0.68
mainFunction · 0.68