* 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()); * } */
| 251 | * } |
| 252 | */ |
| 253 | static 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? |