apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk-Willem van Gulik <di...@covalent.net>
Subject Re: Granularity of mtime
Date Sat, 13 Oct 2001 00:22:04 GMT

On Fri, 12 Oct 2001, Cliff Woolley wrote:

> > > 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?)

>From trying on Solaris and Linux - 2 seconds sleep is the minimum (and
Linux's 2 second sleep seems to be 1.8 second wall clock sometimes).


View raw message