startTime = microtime(true); $this->functionName =$_functionName; $this->pkey="".rand(1000,9999); } public function getStartMessage() { return "[CLOCK] [".$this->pkey."-".$this->functionName."] [started]"; } public function getEndMessage() { return "[CLOCK] [".$this->pkey."-". $this->functionName."] [ended] [elapsed: ".number_format( ( microtime(true) - $this->startTime), 4)."]"; } }