cvs: ZendEngine2 / bench.php
| From: | Ilia Alshanetsky | Date: | Tue, 14 Jun 2005 23:59:29 +0000 |
| Subject: | cvs: ZendEngine2 / bench.php | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3803@lists.php.net to get a copy of this message | ||
iliaa Tue Jun 14 19:59:29 2005 EDT
Modified files:
/ZendEngine2 bench.php
Log:
more accurate timing function.
http://cvs.php.net/diff.php/ZendEngine2/bench.php?r1=1.1&r2=1.2&ty=u
Index: ZendEngine2/bench.php
diff -u ZendEngine2/bench.php:1.1 ZendEngine2/bench.php:1.2
--- ZendEngine2/bench.php:1.1 Wed Sep 29 13:08:45 2004
+++ ZendEngine2/bench.php Tue Jun 14 19:59:29 2005
@@ -336,10 +336,10 @@
/*****/
function getmicrotime()
-{
- list($usec, $sec) = explode(" ",microtime());
- return ((float)$usec + (float)$sec);
-}
+{
+ $t = gettimeofday();
+ return ($t['sec'] + $t['usec'] / 1000000);
+}
function start_test()
{