You are here

public function Stopwatch::start in Devel 8.2

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. 4.x webprofiler/src/Stopwatch.php \Drupal\webprofiler\Stopwatch::start()

Starts an event.

Parameters

string $name The event name:

string $category The event category:

Return value

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 86

Class

Stopwatch
Class Stopwatch

Namespace

Drupal\webprofiler

Code

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