You are here

public function Section::lap in Devel 8.3

Same name and namespace in other branches
  1. 8 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::lap()
  2. 8.2 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::lap()
  3. 4.x webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::lap()

Stops then restarts an event.

Parameters

string $name: The event name.

Return value

\Symfony\Component\Stopwatch\StopwatchEvent The event.

Throws

\LogicException When the event has not been started.

File

webprofiler/src/Stopwatch.php, line 315

Class

Section
@internal This class is for internal usage only

Namespace

Drupal\webprofiler

Code

public function lap($name) {
  return $this
    ->stopEvent($name)
    ->start();
}