]> granicus.if.org Git - php/commitdiff
MFH: fix gettimeofday() tests to not fail if the same time is
authorJoe Orton <jorton@php.net>
Tue, 31 Aug 2004 11:49:19 +0000 (11:49 +0000)
committerJoe Orton <jorton@php.net>
Tue, 31 Aug 2004 11:49:19 +0000 (11:49 +0000)
returned by successive calls.

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";