PHPackages                             jmf/time - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jmf/time

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jmf/time
========

Time package to retrieve and measure time. Provides an implementation of the PSR-20 clock interface.

1.2.0(4mo ago)01.5kMITPHPPHP &gt;=8.3CI passing

Since May 20Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/jmfeurprier/time)[ Packagist](https://packagist.org/packages/jmf/time)[ RSS](/packages/jmf-time/feed)WikiDiscussions 1.2 Synced 1mo ago

READMEChangelogDependencies (7)Versions (6)Used By (0)

Time package
============

[](#time-package)

Installation &amp; Requirements
-------------------------------

[](#installation--requirements)

Install with [Composer](https://getcomposer.org):

```
composer require jmf/time
```

Usage
-----

[](#usage)

### Clock

[](#clock)

`Clock` allows to retrieve current time and date.

Injecting it in your application will allow to ease the testing of time-related operations (mocking its `ClockInterface` interface and making its return values predictable).

```
