return $this->events
[$name]->
stop();
} /**
* Stops then restarts an event.
*
* @throws \LogicException When the event has not been started
*/
public function lap(string
$name): StopwatchEvent
{ return $this->
stopEvent($name)->
start();
} /**
* Returns a specific event by name.
*
* @throws \LogicException When the event is not known
*/
public function getEvent(string
$name): StopwatchEvent
{ if (!
isset($this->events
[$name])) { throw new \
LogicException(sprintf('Event "%s" is not known.',
$name));
}