note 30915 added to function.microtime
| From: | electr0n at msn dot com | Date: | Thu, 03 Apr 2003 06:32:52 +0000 |
| Subject: | note 30915 added to function.microtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46153@lists.php.net to get a copy of this message | ||
Here's the page load in milliseconds:
Not sure if that for loop should be there or not..
Test it with and without it ;D
<?php
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
for ($i=0; $i < 1000; $i++){
}
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo (sprintf("%0.3f", $time*1000));
echo " ms";
?>
--
http://www.php.net/manual/en/function.microtime.php
http://master.php.net/manage/user-notes.php?action=edit+30915
http://master.php.net/manage/user-notes.php?action=delete+30915
http://master.php.net/manage/user-notes.php?action=reject+30915