public function __construct($timestamp = null)
{
if (is_null($timestamp)) {
$this->setMicrotime(\microtime());
} elseif (is_string($timestamp)) {
$this->setMicrotime($timestamp);
} elseif (is_numeric($timestamp)) {
$this->setMicrotimeAsFloat($timestamp);
} else {
throw new \InvalidArgumentException("Timestamp parameter is invalid type.");
}
}