function Section::stopEvent
Stops an event.
Parameters
string $name The event name:
Return value
StopwatchEvent The event
Throws
\LogicException When the event has not been started
File
-
webprofiler/
src/ Stopwatch.php, line 259
Class
- Section
- @internal This class is for internal usage only
Namespace
Drupal\webprofilerCode
public function stopEvent($name) {
if (!isset($this->events[$name])) {
throw new \LogicException(sprintf('Event "%s" is not started.', $name));
}
return $this->events[$name]
->stop();
}