https://github.com/navarr/precise-clocks
Specified Precision Clocks (PSR-20)
https://github.com/navarr/precise-clocks
Last synced: 5 months ago
JSON representation
Specified Precision Clocks (PSR-20)
- Host: GitHub
- URL: https://github.com/navarr/precise-clocks
- Owner: navarr
- License: mit
- Created: 2021-08-29T05:20:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-26T19:07:47.000Z (over 2 years ago)
- Last Synced: 2024-12-29T06:22:23.297Z (7 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Specified Precision Clocks (PSR-20)
[](https://packagist.org/packages/navarr/precise-clocks)
[](https://packagist.org/packages/navarr/precise-clocks)
[](https://packagist.org/packages/navarr/precise-clocks)
[](https://packagist.org/packages/navarr/precise-clocks)


[](https://dashboard.stryker-mutator.io/reports/github.com/navarr/precise-clocks/main)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
```php
use Navarr\PreciseClock\MinutePrecisionClock;$clock = new MinutePrecisionClock();
$a = $clock->now();
$b = $clock->now();spl_object_id($a) === spl_object_id($b); // true
```