public function StopwatchEvent::stop in Devel 8.3
Same name and namespace in other branches
- 8 webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::stop()
- 8.2 webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::stop()
- 4.x webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::stop()
Stops the last started event period.
Return value
\Symfony\Component\Stopwatch\StopwatchEvent The event.
Throws
\LogicException When stop() is called without a matching call to start().
1 call to StopwatchEvent::stop()
- StopwatchEvent::ensureStopped in webprofiler/
src/ Stopwatch.php - Stops all non already stopped periods.
File
- webprofiler/
src/ Stopwatch.php, line 412
Class
- StopwatchEvent
- Class StopwatchEvent.
Namespace
Drupal\webprofilerCode
public function stop() {
if (!count($this->started)) {
throw new \LogicException('stop() called but start() has not been called before.');
}
$this->periods[] = new StopwatchPeriod(array_pop($this->started), $this
->getNow());
return $this;
}