PHPackages                             manchenkov/timer - 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. manchenkov/timer

ActiveLibrary

manchenkov/timer
================

'Timer' is a class to help build time interval value in seconds by object-oriented style

1.0.3(5y ago)171MITPHPPHP ^7.4CI failing

Since May 22Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/manchenkoff/timer-helper)[ Packagist](https://packagist.org/packages/manchenkov/timer)[ RSS](/packages/manchenkov-timer/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Timer
=====

[](#timer)

[![Latest Stable Version](https://camo.githubusercontent.com/59a73b7cd54de2f344c824d638356d1ef05ed194a0344e4447d163e97e9f753a/687474703a2f2f706f7365722e707567782e6f72672f6d616e6368656e6b6f762f74696d65722f76)](https://packagist.org/packages/manchenkov/timer)[![Total Downloads](https://camo.githubusercontent.com/c851ca68e572248723ef551ad02177e2cce244dfd6fd66e0a381140304deb451/687474703a2f2f706f7365722e707567782e6f72672f6d616e6368656e6b6f762f74696d65722f646f776e6c6f616473)](https://packagist.org/packages/manchenkov/timer)[![License](https://camo.githubusercontent.com/894e793fe61343cd1053ff3fdf66f28be0adf3ef4c6af6db9360214356d78460/687474703a2f2f706f7365722e707567782e6f72672f6d616e6368656e6b6f762f74696d65722f6c6963656e7365)](https://packagist.org/packages/manchenkov/timer)[![PHP Version Require](https://camo.githubusercontent.com/635c3cd2b9751e0b8dd5ad6b1619ed53b1bbf92547920c6003cb89513afcb308/687474703a2f2f706f7365722e707567782e6f72672f6d616e6368656e6b6f762f74696d65722f726571756972652f706870)](https://packagist.org/packages/manchenkov/timer)

**Timer** is a class to help build time interval value in seconds by object-oriented style

Installation
------------

[](#installation)

You have to run following command to add a dependency to your project

```
composer require manchenkov/timer
```

or you can add this line to `require` section of `composer.json`

```
"manchenkov/timer": "*"

```

Usage
-----

[](#usage)

```
use Manchenkov\Timer\Timer;

$timer = Timer::get()->hours(5)->minutes(10)->seconds(34);

$intervalValue = $timer->asNumber(); //  -> 18634 = 34 + (10 * 60) + (5 * 3600)

$intervalString = $timer->asString(); //  -> 05:10:34
// or
$intervalString = (string)$timer; //  -> 05:10:34
```

Testing
-------

[](#testing)

To run test cases you should execute the following command

```
./vendor/bin/phpunit tests --testdox
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance54

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~168 days

Total

4

Last Release

2046d ago

PHP version history (2 changes)1.0.1PHP ^7

1.0.3PHP ^7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6690063?v=4)[Artem Manchenkov](/maintainers/manchenkoff)[@manchenkoff](https://github.com/manchenkoff)

---

Top Contributors

[![manchenkoff](https://avatars.githubusercontent.com/u/6690063?v=4)](https://github.com/manchenkoff "manchenkoff (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

datetimeintervalphpphp-helpertimetimestamp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/manchenkov-timer/health.svg)

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

PHPackages © 2026

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