navarr / precise-clocks
An implementation of PSR-20 that is precise within given confines
Fund package maintenance!
navarr
Requires
- php: ^8
- navarr/wall-clock: ^1
- psr/clock: ^1
Requires (Dev)
- infection/infection: ^0.26.0
- jetbrains/phpstorm-attributes: ^1.0
- navarr/periodically-advancing-clock: ^1
- navarr/specific-time: ^1
- phpstan/phpstan: ^1
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.6
Provides
This package is auto-updated.
Last update: 2024-10-26 23:42:47 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