public function Stopwatch::stopSection

Stops the last started section.

The id parameter is used to retrieve the events from this section.

Parameters

string $id The identifier of the section:

See also

getSectionEvents

File

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

Class

Stopwatch
Stopwatch provides a way to profile code.

Namespace

Symfony\Component\HttpKernel\Debug

Code

public function stopSection($id) {
  $this
    ->stop('__section__');
  if (1 == count($this->activeSections)) {
    throw new \LogicException('There is no started section to stop.');
  }
  $this->sections[$id] = array_pop($this->activeSections)
    ->setId($id);
  $this
    ->stop('__section__.child');
}