[darcs-users] TortoiseDarcs and Darcs 2 Hashed Repos

Dan Pascu dan at ag-projects.com
Thu Oct 16 16:15:08 UTC 2008


On Thursday 16 October 2008, zooko wrote:
> On Oct 14, 2008, at 8:00 AM, David Roundy wrote:
> > Why would  we need more than 2 seconds? (Not disbelieving, just
> > curious.) Does windows have a time stamp  granularity of greater than
> > 1 second?
>
> FAT's granularity is 2 seconds, but I think I saw rumours on the web
> archives of various mailing lists that on some filesystems, operating
> systems, virtual machines, etc. that the effective granularity of
> mtimes is sometimes 3 or 4 seconds.
>
> Still not knowing what we are actually talking about, I wonder if
> "sleep 2" or "sleep 4" couldn't be replaced with something like
>
> touch a_temp_file
> while mtime(thefile) == mtime(a_temp_file):
>      sleep 0.2
>      touch a_temp_file
>
> If that could be made to work, it would be more reliable and faster
> than "sleep 2".

Not if the timestamp is not updated for whatever reason (bug for example). 
Then it'll become a nice infinite loop.

-- 
Dan


More information about the darcs-users mailing list