PHPackages                             amberovsky/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. amberovsky/time

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

amberovsky/time
===============

Time utility class

v1.0.1(5y ago)09BSD-3-ClausePHPPHP ^7.4

Since Jul 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/amberovsky/time)[ Packagist](https://packagist.org/packages/amberovsky/time)[ RSS](/packages/amberovsky-time/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Time
====

[](#time)

Utility class which encapsulates `\time()` and allows freeze/unfreeze time.

### How to use

[](#how-to-use)

Install by `composer require amberovsky/time`

```
$time = new Amberovsky\Time\Time();

$time->getTimestamp(); // current timestamp
$time->freeze(1);
$time->getTimestamp(); // == 1
$time->unfreeze();
$time->getTimestamp(); // current timestamp
```

### How to contribute

[](#how-to-contribute)

Please fork this repo and create a PR. Make sure you run tests before submitting yout PR:

```
make phpstan
make psalm
make phpspec
```

### License

[](#license)

Copyright (C) 2020 Anton Zagorskii, BSD-3-Clause license, See [license file](/LICENSE.txt) for details

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2128d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/477339?v=4)[amberovsky](/maintainers/amberovsky)[@amberovsky](https://github.com/amberovsky)

---

Top Contributors

[![amberovsky](https://avatars.githubusercontent.com/u/477339?v=4)](https://github.com/amberovsky "amberovsky (1 commits)")

###  Code Quality

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/amberovsky-time/health.svg)

```
[![Health](https://phpackages.com/badges/amberovsky-time/health.svg)](https://phpackages.com/packages/amberovsky-time)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
