Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11527 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30978 invoked by uid 1010); 23 Jul 2004 21:51:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30949 invoked from network); 23 Jul 2004 21:51:22 -0000 Received: from unknown (HELO mail.zend.com) (80.74.107.235) by pb1.pair.com with SMTP; 23 Jul 2004 21:51:22 -0000 Received: (qmail 14927 invoked from network); 23 Jul 2004 21:51:20 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 23 Jul 2004 21:51:20 -0000 Message-ID: <5.1.0.14.2.20040723145100.02adeae0@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Fri, 23 Jul 2004 14:51:19 -0700 To: Joe Orton ,internals@lists.php.net In-Reply-To: <20040723211715.GA15309@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] [PATCH] time/001.phpt fix From: andi@zend.com (Andi Gutmans) References: <20040723211715.GA15309@redhat.com> Yep you're right. It can definitely return the same time twice in a row. I'll commit this. At 10:17 PM 7/23/2004 +0100, Joe Orton wrote: >[resend] > >There's no reason why gettimeofday() shouldn''t return the same time in >successive calls; this test fails spuriously on Linux/x86_64 (which has >a particularly fast gettimeofday() implementation). > >--- ext/standard/tests/time/001.phpt 23 May 2003 20:56:33 >-0000 1.4.2.2 >+++ ext/standard/tests/time/001.phpt 16 Jul 2004 12:50:13 -0000 >@@ -17,7 +17,7 @@ > > for ($i=1;$i<=100000;$i++) { > list($micro,$time)=explode(" ",microtime()); >- if ($time > $last_t || ($time == $last_t && $micro > $last_m)) { >+ if ($time > $last_t || ($time == $last_t && $micro >= $last_m)) { > $passed++; > } else if ($failed++ <=10) { > $result .= sprintf('%06d', $i).": $time $micro < $last_t > $last_m\n"; > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php