You are here

public function Stopwatch::start in Devel 4.x

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Stopwatch::start()
  2. 8 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Stopwatch::start()
  3. 8.2 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Stopwatch::start()

Starts an event.

Parameters

string $name: The event name.

string $category: The event category.

Return value

\Symfony\Component\Stopwatch\StopwatchEvent A StopwatchEvent instance

1 call to Stopwatch::start()
Stopwatch::openSection in webprofiler/src/Stopwatch.php
Creates a new section or re-opens an existing section.

File

webprofiler/src/Stopwatch.php, line 95

Class

Stopwatch
Class Stopwatch.

Namespace

Drupal\webprofiler

Code

public function start($name, $category = NULL) {
  return end($this->activeSections)
    ->startEvent($name, $category);
}