/** * Stops the timer identified by $name. * * $name can be omitted (false) if only one timer is running. * * @param string|bool $name */ public function stopTimer($name = false) { $this->timer->stopTimer($name); }
public function testMultipleRunningTimers() { $timer = new ezcDebugTimer(); $timer->startTimer("Ray", "Local", "host"); $timer->startTimer("Ray2", "Local", "host"); $timer->startTimer("Ray3", "Local", "bla"); $this->assertEquals(false, $timer->stopTimer("hehe")); $timer->stopTimer("Ray2"); $timer->stopTimer("Ray3"); $timer->stopTimer("Ray"); $structure = $timer->getTimeData(); $this->assertEquals(3, count($structure)); // Expected order? $this->assertEquals("Ray2", $structure[0]->name); $this->assertEquals("Ray3", $structure[1]->name); $this->assertEquals("Ray", $structure[2]->name); }