On 22 May 2012 12:00, Justin Lebar <[email protected]> wrote: >> I've been burned by mtime only checking before as >> (excluding some recent file systems) mtime has a resolution >> only down to one second. > > I tried to address this in the patch, although come to think of it, I > did it wrong. > > The trick is only to *cache* mtimes that are at least one second older > than now. Then the resolution of the clock isn't a problem.
Better to do 2 seconds, since FAT (and maybe some other Windows related setups) has only a 2-second resolution. The other thing you can do is, on Unix, use the latest of ctime and mtime, which should catch cases where the mtime gets reset. > But if the system clock is set back (e.g. by NTP), we're in trouble. That's true, but it's a pretty bad idea to make large time steps on a build machine... > And hardlinks are often created without bumping the inode's mtime, > which is also problematic. (It's problematic for make, too.) ctime will catch that. -- Martin _______________________________________________ ccache mailing list [email protected] https://lists.samba.org/mailman/listinfo/ccache
