note 30915 deleted from function.microtime by et
| From: | et@php.net | Date: | Tue, 15 Jul 2003 17:35:01 +0000 |
| Subject: | note 30915 deleted from function.microtime by et | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52148@lists.php.net to get a copy of this message | ||
Note Submitter: electr0n@msn.com
----
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";
?>