PHPackages                             audentio/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. audentio/timer

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

audentio/timer
==============

A timer utility class

0.0.1(4y ago)0142MITPHPPHP ^7.4|^8.0

Since Jun 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Audentio/php-timer)[ Packagist](https://packagist.org/packages/audentio/timer)[ Docs](https://www.audent.io)[ RSS](/packages/audentio-timer/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

audentio/timer
==============

[](#audentiotimer)

Utility class for timing actions, and limiting the time actions run for.

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

[](#installation)

This library should be installed through Composer:

```
$ composer require audentio/timer
```

Usage
-----

[](#usage)

### Limiting actions on a single request to a set period of time.

[](#limiting-actions-on-a-single-request-to-a-set-period-of-time)

You may want to limit batched actions that are performed on a single request to prevent timeouts. For example, if you'd like to limit it to 15 seconds you can do the following:

```
require './vendor/autoload.php';

use Audentio\Timer\Timer;

$timer = new Timer(15);

while (true) {
    // Perform some action...
    if ($timer->hasExceededLimit()) {
        break;
    }
}
```

### Timing actions

[](#timing-actions)

If you want to see how long actions are running for without any sort of limit you can do the following:

```
require './vendor/autoload.php';

use Audentio\Timer\Timer;

$timer = new Timer();

sleep(15);

$duration = $timer->end();

echo 'Action time in milliseconds: ' . number_format($duration->getMilliseconds());
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

1485d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d939e98939cc044e9af68c9f67895797aeaa7d4e4f76ad181aefbc72766895fe?d=identicon)[audentio](/maintainers/audentio)

---

Top Contributors

[![JakeBooher](https://avatars.githubusercontent.com/u/179180?v=4)](https://github.com/JakeBooher "JakeBooher (3 commits)")

### Embed Badge

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

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

PHPackages © 2026

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