for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Robo\Common;
trait Timer
{
/**
* @var \Robo\Common\TimeKeeper|null
*/
protected $timer;
protected function startTimer()
if (!isset($this->timer)) {
$this->timer = new TimeKeeper();
}
$this->timer->start();
protected function stopTimer()
return;
$this->timer->stop();
protected function resetTimer()
$this->timer->reset();
* @return float|null
protected function getExecutionTime()
return null;
return $this->timer->elapsed();