public function StopwatchEvent::stop

Stops the last started event period.

Return value

StopwatchEvent The event

1 call to StopwatchEvent::stop()
StopwatchEvent::ensureStopped in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/StopwatchEvent.php
Stops all non already stopped periods.

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/StopwatchEvent.php, line 79

Class

StopwatchEvent
Represents an Event managed by Stopwatch.

Namespace

Symfony\Component\HttpKernel\Debug

Code

public function stop() {
  if (!count($this->started)) {
    throw new \LogicException('stop() called but start() has not been called before.');
  }
  $this->periods[] = array(
    array_pop($this->started),
    $this
      ->getNow(),
  );
  return $this;
}