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

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

andreasnij/a-timer
==================

A simple timer to measure execution time.

2.1(2y ago)510.5k↓40%2MITPHPPHP &gt;=8.1

Since Nov 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/andreasnij/a-timer)[ Packagist](https://packagist.org/packages/andreasnij/a-timer)[ Docs](http://github.com/andreasnij/a-timer)[ RSS](/packages/andreasnij-a-timer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

A Timer
=======

[](#a-timer)

[![Latest Stable Version](https://camo.githubusercontent.com/d92403339185cf6090ef0e15c785d2b7be60bc518d396a1b79616079e88bc1d2/68747470733a2f2f706f7365722e707567782e6f72672f616e64726561736e696a2f612d74696d65722f762f737461626c65)](https://packagist.org/packages/andreasnij/a-timer)

A simple timer to time/benchmark operations with a short human-readable result.

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

[](#installation)

Add the package as a requirement to your `composer.json`:

```
$ composer require andreasnij/a-timer
```

Usage
-----

[](#usage)

```
use ATimer\Timer;

$timer = new Timer();

// Some operations that take time
echo $timer->getDurationFormatted();

// Example output: 1.237s
```

Author
------

[](#author)

Andreas Nilsson ()

License
-------

[](#license)

Licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity75

Established project with proven stability

 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 ~1021 days

Total

4

Last Release

781d ago

Major Versions

1.0.1 → 2.02022-01-18

PHP version history (3 changes)1.0.0PHP &gt;=5.6.0

2.0PHP &gt;=7.4

2.1PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![andreasnij](https://avatars.githubusercontent.com/u/1712334?v=4)](https://github.com/andreasnij "andreasnij (15 commits)")

---

Tags

phptimertimerbenchmarktiming

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[devster/ubench

Micro PHP library for benchmarking

5701.0M29](/packages/devster-ubench)[dragon-code/benchmark

Simple comparison of code execution speed between different options

11934.7k5](/packages/dragon-code-benchmark)[ayesh/php-timer

High-resolution and monotonic stop-watch for all your needs. Supports timer start, pause, resume, stop, read, and minimal conversion.

22226.4k11](/packages/ayesh-php-timer)[christophrumpel/artisan-benchmark

Benchmark Artisan Commands

17966.6k](/packages/christophrumpel-artisan-benchmark)[icecave/chrono

A date &amp; time library that is decoupled from the system clock.

54188.9k7](/packages/icecave-chrono)

PHPackages © 2026

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