]> 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 10:34:15 +0000 (10:34 +0000)
committerJoe Orton <jorton@php.net>
Tue, 31 Aug 2004 10:34:15 +0000 (10:34 +0000)
returned by successive calls.

ext/standard/tests/time/001.phpt

index 8529845b713b637359e368060e4ee82b4cdcf88f..019695563c81a591f9bddd81b9a002b7048b776f 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";