note 30945 added to function.microtime
| From: | matthieu dot houriet at nimag dot net | Date: | Fri, 04 Apr 2003 01:48:40 +0000 |
| Subject: | note 30945 added to function.microtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46200@lists.php.net to get a copy of this message | ||
Here's a simpler and shorter code to calculate execution time :
$t_start = array_sum(explode(' ', microtime()));
/*
... code to evaluate ...
*/
$exec_time = array_sum(explode(' ', microtime())) - $t_start;
echo ("Execution time is $exec_time seconds.");
--
http://www.php.net/manual/en/function.microtime.php
http://master.php.net/manage/user-notes.php?action=edit+30945
http://master.php.net/manage/user-notes.php?action=delete+30945
http://master.php.net/manage/user-notes.php?action=reject+30945