From 2d9230979735591d8833bddd739337d67ff0ddc2 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 14 Jun 2005 23:59:29 +0000 Subject: [PATCH] more accurate timing function. --- Zend/bench.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/bench.php b/Zend/bench.php index c45fe40bcc9..848a099ea56 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() {