Location: PHPKode > scripts > timing class > timing-class/timing.class.php
<?php
//***********************************************************************
//***************Written by Rahman Haqparast February 2003***************
//*************a class for timing different parts of a code**************
//***********************************************************************
class timing
{
var $start_time;
var $stop_time;
	function start()
	{
		$this->start_time=explode(" ", microtime());
	}
	function stop()
	{
		$this->stop_time=explode(" ", microtime());
	}
	function get_time()
	{
		$seconds=$this->stop_time[1]-$this->start_time[1];
		$micros=$this->stop_time[0]-$this->start_time[0];
		return $seconds+$micros;
	}
}
?>
Return current item: timing class