[TYPO3-dev] timer for debugging
Steffen Kamper
info at sk-typo3.de
Sun Mar 7 23:46:45 CET 2010
Hi,
i use this in classes:
private $timer;
...
$this->timerStart();
... do your stuff
$time = $this->timerStop();
/**
* Start internal timer, used for time measure
*/
protected function timerStart() {
$this->timer = microtime(true);
}
/**
* Stop internal timer and return difference, used for time measure
*
* @return float timer difference
*/
protected function timerStop() {
return microtime(true) - $this->timer;
}
vg Steffen
More information about the TYPO3-dev
mailing list