Skip to content

Clock

Everything under Quiote\Support\Clock.

ClassDescription
ClockStatic facade over the process-wide clock, mirroring Config.
FrozenClockA clock that does not move except when told to: every read answers the wall-clock/monotonic values last set, however much real time elapses between two calls.
OffsetClockA clock that ticks in real time but reports a fixed offset from another clock — “the client’s clock is ten minutes fast”, “this node’s clock has * drifted 30 seconds behind the cluster”.
SystemClockThe real clock: ClockInterface::now()/ClockInterface::unixTimestamp()/ ClockInterface::microtime() answer from the system wall clock exactly like new DateTimeImmutable()/time()/microtime(true) always did, and ClockInterface::monotonic() from hrtime(true).
InterfaceDescription
ClockInterfaceThe one seam every direct time()/microtime()/new DateTime() call site in core is meant to go through instead.