public function StopwatchEvent::__construct in Devel 8.3
Same name and namespace in other branches
- 8 webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::__construct()
- 8.2 webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::__construct()
- 4.x webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::__construct()
Constructor.
Parameters
float $origin: The origin time in milliseconds.
string|null $category: The event category or null to use the default.
Throws
\InvalidArgumentException When the raw time is not valid.
File
- webprofiler/
src/ Stopwatch.php, line 366
Class
- StopwatchEvent
- Class StopwatchEvent.
Namespace
Drupal\webprofilerCode
public function __construct($origin, $category = NULL) {
$this->origin = $this
->formatTime($origin);
$this->category = is_string($category) ? $category : 'default';
}