apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: Granularity of mtime
Date Fri, 12 Oct 2001 23:05:52 GMT
On Fri, 12 Oct 2001, Ryan Bloom wrote:

> On Friday 12 October 2001 01:56 pm, Dirk-Willem van Gulik wrote:
> > On some versions of Linux/Solaris fstat(2) gives you a second granularity
> > of mtime/atime/ctime. On some other OS-es/versions you get mSec's.
> >
> > Is there a way to ask APR what the granularity is ?
> All APR times are mSec.

Yes, but if the OS stores only seconds for the mtime, the APR time is
seconds*APR_USEC_PER_SEC, right?  So while there are extra zeros at the
end, that doesn't necessarily mean there's extra precision.  So if you
want to sleep just long enough to ensure that the mtime will be different,
what do you do?  I guess you have to assume worst case... (is that 1s or
is it more than that?)


   Cliff Woolley
   Charlottesville, VA

View raw message