]> granicus.if.org Git - php/commitdiff
- There's no reason why gettimeofday() shouldn''t return the same time in
authorAndi Gutmans <andi@php.net>
Fri, 23 Jul 2004 21:53:16 +0000 (21:53 +0000)
committerAndi Gutmans <andi@php.net>
Fri, 23 Jul 2004 21:53:16 +0000 (21:53 +0000)
successive calls; this test fails spuriously on Linux/x86_64 (which has
a particularly fast gettimeofday() implementation).
- Joe Orton <jorton@redhat>

ext/standard/tests/time/001.phpt

index 74802ec7fcfb2496cde01251441826dd9b6f6192..3b0ed8a77f40d4a1f95eea95017a2ff7e9a89523 100644 (file)
@@ -17,7 +17,7 @@ set_time_limit(0);
 
 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";