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

ActiveLibrary

gabrielef/timer
===============

Tiny PHP timer utility to measure time

0.0.2(4y ago)05MITPHP

Since Jul 24Pushed 4y ago1 watchersCompare

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

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

Timer
=====

[](#timer)

Tiny PHP timer utility to measure time

Install
-------

[](#install)

```
$ composer require gabrielef/timer
```

Usage
-----

[](#usage)

Start a new timer with name and precision:

```
use gabrielef\Timer;

$t = new Timer();
$t->start('firstTimer', 3);
```

Retrieve the amount of time passed of a specific timer:

```
use gabrielef\Timer;

$t = new Timer();
$t->start('firstTimer', 3);

//...
//after 1s

echo $t->look('firstTimer'); //ex. 1.234
```

Stop the timer (this will also delete the timer):

```
use gabrielef\Timer;
$t = new Timer();
$t->start('firstTimer');

//...
//after 3s

echo $t->end('firstTimer'); //ex. 3
```

List all the available timer key:

```
use gabrielef\Timer;

$t = new Timer();
$t->start('firstTimer');
$t->start('secondTimer');
$t->start('thirdTimer');

$list = $t->list(); // ['firstTimer', 'secondTimer', 'thirdTimer]
```

Test
----

[](#test)

Currently using PHPUnit with the following command:

```
$ docker run --rm -v $(pwd):/app -w /app php:7.3-cli ./vendor/bin/phpunit --debug
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

1758d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6473ab0ad8789b1aa3eb4fc1f23b3559176746828efcceee9dca440bcb744947?d=identicon)[gabrielef](/maintainers/gabrielef)

---

Top Contributors

[![gabrielef](https://avatars.githubusercontent.com/u/2587166?v=4)](https://github.com/gabrielef "gabrielef (6 commits)")

---

Tags

timetimer

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[phpunit/php-timer

Utility class for timing

7.7k876.7M130](/packages/phpunit-php-timer)[psr/clock

Common interface for reading the clock.

642332.9M343](/packages/psr-clock)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[symfony/clock

Decouples applications from the system clock

430168.9M205](/packages/symfony-clock)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[azuyalabs/yasumi

The easy PHP Library for calculating holidays

1.1k11.4M26](/packages/azuyalabs-yasumi)

PHPackages © 2026

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