public function Section::startEvent in Devel 4.x
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()
- 8.2 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::startEvent()
Starts an event.
Parameters
string $name: The event name.
string $category: The event category.
Return value
\Symfony\Component\Stopwatch\StopwatchEvent The event
File
- webprofiler/
src/ Stopwatch.php, line 262
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();
}