From: Ilia Alshanetsky Date: Tue, 14 Jun 2005 23:59:29 +0000 (+0000) Subject: more accurate timing function. X-Git-Tag: php-5.1.0b2~191 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d9230979735591d8833bddd739337d67ff0ddc2;p=php more accurate timing function. --- diff --git a/Zend/bench.php b/Zend/bench.php index c45fe40bcc..848a099ea5 100644 --- a/Zend/bench.php +++ b/Zend/bench.php @@ -336,10 +336,10 @@ function strcat($n) { /*****/ function getmicrotime() -{ - list($usec, $sec) = explode(" ",microtime()); - return ((float)$usec + (float)$sec); -} +{ + $t = gettimeofday(); + return ($t['sec'] + $t['usec'] / 1000000); +} function start_test() {