function 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\webprofiler

Code

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();
}