navarr / precise-clocks
An implementation of PSR-20 that is precise within given confines
Fund package maintenance!
v1.0.1
2025-10-06 20:09 UTC
Requires
- php: ^8.2
- navarr/wall-clock: ^1
- psr/clock: ^1
Requires (Dev)
- infection/infection: ^0.31.0
- jetbrains/phpstorm-attributes: ^1.0
- navarr/periodically-advancing-clock: ^1
- navarr/specific-time: ^1
- phpstan/phpstan: ^2
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.6
Provides
This package is auto-updated.
Last update: 2026-03-06 20:58:03 UTC
README
This library contains implementations of PSR-20 that provides a clocks that are precise to their namesake, and while in the same time to that precision, return the exact same object.
Installation
composer require navarr/precise-clocks:^1
Usage
use Navarr\PreciseClock\MinutePrecisionClock; $clock = new MinutePrecisionClock(); $a = $clock->now(); $b = $clock->now(); spl_object_id($a) === spl_object_id($b); // true