I think I actually got this code from this message board somewhere. It will output the number of seconds taken to output.
Put this function at the beginning of your script, before the html code or basically whenever you want the timer to start:
function utime (){
$time = explode( " ", microtime());
$usec = (double)$time[0];
$sec = (double)$time[1];
return $sec + $usec;
}
$start = utime();
Then, at the end of your script or when you want the timer to stop, paste this code:
$end = utime(); $run = $end - $start; echo "Page expelled in " . substr($run, 0, 5) .' secs.';