public function Section::startEvent in Devel 8.2
Same name and namespace in other branches
- 8.3 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::startEvent()
- 8 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::startEvent()
- 4.x webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::startEvent()
Starts an event.
Parameters
string $name The event name:
string $category The event category:
Return value
StopwatchEvent The event
File
- webprofiler/src/ Stopwatch.php, line 231 
Class
- Section
- @internal This class is for internal usage only
Namespace
Drupal\webprofilerCode
public function startEvent($name, $category) {
  if (!isset($this->events[$name])) {
    $this->events[$name] = new StopwatchEvent($this->origin ?: microtime(TRUE) * 1000, $category);
  }
  return $this->events[$name]
    ->start();
}