note 53969 added to function.microtime
| From: | vladson at pc-labs dot info | Date: | Sun, 19 Jun 2005 10:49:21 +0000 |
| Subject: | note 53969 added to function.microtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90646@lists.php.net to get a copy of this message | ||
I like to use bcmath for it
<?php
function micro_time() {
$temp = explode(" ", microtime());
return bcadd($temp[0], $temp[1], 6);
}
$time_start = micro_time();
sleep(1);
$time_stop = micro_time();
$time_overall = bcsub($time_stop, $time_start, 6);
echo "Execution time - $time_overall Seconds";
?>
----
Manual Page -- http://www.php.net/manual/en/function.microtime.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53969
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53969&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53969&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53969&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53969&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+53969&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53969&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53969&report=yes
Search -- http://master.php.net/manage/user-notes.php