/**
* @param float $origin The origin time in milliseconds
* @param string|null $category The event category or null to use the default
* @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision
* @param string|null $name The event name or null to define the name as default
*
* @throws \InvalidArgumentException When the raw time is not valid
*/
public function __construct(float
$origin, string
$category = null, bool
$morePrecision = false, string
$name = null
) { $this->origin =
$this->
formatTime($origin);
$this->category = \
is_string($category) ?
$category : 'default';
$this->morePrecision =
$morePrecision;
$this->name =
$name ?? 'default';
} /**
* Gets the category.
*/
public function getCategory(): string
{ return $this->category;
}