* 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()); * } */
| 311 | * } |
| 312 | */ |
| 313 | static 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? |