From dev-return-5290-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Wed Jan 02 23:16:58 2002 Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 40268 invoked by uid 500); 2 Jan 2002 23:16:58 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 40257 invoked from network); 2 Jan 2002 23:16:58 -0000 Message-ID: <001801c193e3$c2c95c00$7500a8c0@goliath> From: "David Reid" To: "APR Dev List" References: <20020102224756.14965.qmail@icarus.apache.org> <20020102145354.E1529@clove.org> Subject: Re: cvs commit: apr/test testsleep.c Date: Wed, 2 Jan 2002 23:18:17 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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" To: 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, jerenkrantz@apache.org 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 >