Skip to content

Clock ​

Rasuvaeff\PropertyTesting\Runner\Clock

Interface — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2

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.