The reason for the extra is that we measure in calls that will add time to the sleep, hence the time measured is unlikely to be less...
david ----- Original Message ----- From: "Aaron Bannert" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Wednesday, January 02, 2002 10:53 PM Subject: Re: cvs commit: apr/test testsleep.c > On Wed, Jan 02, 2002 at 10:47:56PM -0000, [EMAIL PROTECTED] wrote: > > jerenkrantz 02/01/02 14:47:56 > > > > Modified: test testsleep.c > > Log: > > Add stdlib.h for exit. > > Print out the time information if we fail. On my Linux SMP box, we > > sleep for less than the time requested. Is this permissible? (I'd > > suggest doing 0.99*interval<->1.01*interval.) > > Usually sleep timeouts are considered upper limits, as well as the fact > that in many implementations it is possible to return early if interrupted > by a signal. > > +1 for checking the range [0.99, 1.01]*interval. > > -aaron >
