MCPcopy Index your code
hub / github.com/RsyncProject/rsync / same_time

Function same_time

util1.c:1478–1488  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

1476 * the modification timestamp window established by --modify-window).
1477 * Returns 1 if the times the "same", or 0 if they are different. */
1478int 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>

Callers 6

same_mtimeFunction · 0.85
set_file_attrsFunction · 0.85
mtime_differsFunction · 0.85
any_time_differsFunction · 0.85
itemizeFunction · 0.85
find_fuzzyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected