Skip to content

Clock

Rasuvaeff\PropertyTesting\Runner\Clock

InterfacePackage: property-testing-coreSourceVersion: v0.1.0-12-g86ead85

Implemented by: Runner\MonotonicClock

Monotonic time source behind the per-run deadline and the phase budget.

The seam exists so deadline/budget behaviour can be characterised deterministically (a fake clock advances by exact amounts) instead of by sleeping; production code always uses Runner\MonotonicClock.

Methods

nanoseconds()

php
nanoseconds(): int

Current reading of a monotonic clock, in nanoseconds. Only differences between two readings are meaningful.