Re: [PATCH] time/001.phpt fix
| From: | Andi Gutmans | Date: | Fri, 23 Jul 2004 21:51:19 +0000 |
| Subject: | Re: [PATCH] time/001.phpt fix | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11527@lists.php.net to get a copy of this message | ||
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