I dont want it to show millions of extra numbers.
For example. 2.436346346300 secs
Here is my code. I am using it for execution time.
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
//CODE HERE
$time_end = getmicrotime();
$time = sprintf('%.16f', $time_end - $time_start);
echo 'Loaded in ' . $time . ' seconds';