Timer Class
<?php
class Timer{
var $start;
//Use this function at the beginning of the file:
function start(){
$this->start = microtime(true); //Getting current Unix timestamp with microseconds (as float):
}
//(put at end of file )Get the end time and return the time used (As ms):
function stop(){
return round((microtime(true) - $this->start) * 1000,4);
}
}
?>
This class can be used to display the time which the script was executed in.
