diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-06-14 23:59:29 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-06-14 23:59:29 +0000 |
commit | 2d9230979735591d8833bddd739337d67ff0ddc2 (patch) | |
tree | 341b46631bf60b32c2df47ba5029c8e021955ddf /Zend/bench.php | |
parent | 9392a1c9de9eb26649da76cd621f9ea2645046c8 (diff) | |
download | php-git-2d9230979735591d8833bddd739337d67ff0ddc2.tar.gz |
more accurate timing function.
Diffstat (limited to 'Zend/bench.php')
-rw-r--r-- | Zend/bench.php | 8 |
1 files changed, 4 insertions, 4 deletions
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() { |