3
* Simple interface for timing operations/actions.
5
* $Horde: framework/Timer/Timer.php,v 1.6 2004/08/30 13:38:18 chuck Exp $
15
var $_start = array();
23
* Push a new timer start on stack.
27
list($ms, $s) = explode(' ', microtime());
28
$this->_start[$this->_idx++] = floor($ms * 1000) + 1000 * $s;
32
* Pop the latest timer start and return the difference with the
37
assert($this->_idx > 0);
38
list($ms, $s) = explode(' ', microtime());
39
$etime = floor($ms * 1000) + (1000 * $s);
41
return $etime - $this->_start[$this->_idx];
45
* Return a reference to a global Horde_Timer engine.
52
$timer = new Horde_Timer();