timestamp = $timestamp; $this->value = $value; } public static function recordNow(float $value): Value { return new self(time(), $value); } public static function auto(float $value): Value { return new self(null, $value); } public function getTimestamp(): string { return $this->timestamp ?? '*'; } public function getValue(): float { return $this->value; } public function __toString(): string { return sprintf('(' . $this->timestamp . ':' . $this->value . ')'); } }