public function instant() { if ($this->tickNanos % 1000000 == 0) { $millis = $this->baseClock->millis(); return Instant::ofEpochMilli($millis - Math::floorMod($millis, $this->tickNanos / 1000000)); } $instant = $this->baseClock->instant(); $nanos = $instant->getNano(); $adjust = Math::floorMod($nanos, $this->tickNanos); return $instant->minusNanos($adjust); }
public function millis() { return $this->baseClock->millis() + $this->offset->toMillis(); }