Determine if two time_t values are equivalent (either exact, or in * the modification timestamp window established by --modify-window). * Returns 1 if the times the "same", or 0 if they are different. */
| 1476 | * the modification timestamp window established by --modify-window). |
| 1477 | * Returns 1 if the times the "same", or 0 if they are different. */ |
| 1478 | int same_time(time_t f1_sec, unsigned long f1_nsec, time_t f2_sec, unsigned long f2_nsec) |
| 1479 | { |
| 1480 | if (modify_window == 0) |
| 1481 | return f1_sec == f2_sec; |
| 1482 | if (modify_window < 0) |
| 1483 | return f1_sec == f2_sec && f1_nsec == f2_nsec; |
| 1484 | /* The nanoseconds do not figure into these checks -- time windows don't care about that. */ |
| 1485 | if (f2_sec > f1_sec) |
| 1486 | return f2_sec - f1_sec <= modify_window; |
| 1487 | return f1_sec - f2_sec <= modify_window; |
| 1488 | } |
| 1489 | |
| 1490 | #ifdef __INSURE__XX |
| 1491 | #include <dlfcn.h> |
no outgoing calls
no test coverage detected