PHPackages                             pragmarx/support - 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. pragmarx/support

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

pragmarx/support
================

PragmaRX components support package

v0.9.6(2y ago)591.5M↓21.5%56[7 issues](https://github.com/antonioribeiro/support/issues)[2 PRs](https://github.com/antonioribeiro/support/pulls)20BSD-3-ClausePHPPHP &gt;=5.4.0

Since Feb 28Pushed 2y ago5 watchersCompare

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

READMEChangelog (4)Dependencies (2)Versions (58)Used By (20)

Support
=======

[](#support)

Timer
-----

[](#timer)

A timer class that can be called static or dynamically.

Source code: [support/blob/master/src/Timer.php](https://github.com/antonioribeiro/support/blob/master/src/Timer.php)

### Methods

[](#methods)

Those are the methods:

```
Timer::start();
Timer::stop();
Timer::isStarted();
Timer::isStopped();
Timer::elapsed(); // returns a formatted value 9.0192
Timer::elapsedRaw(); // returns a double 9.019223049023
Timer::setFormat(default = '%.4f');

```

You can name your timers and have more than one running:

```
Timer::start('mary');
Timer::stop('mary');
Timer::elapsed('mary');

```

### Examples

[](#examples)

```
Timer::start();
Timer::start('2nd timer');

var_dump("started: " . (Timer::isStarted() ? 'yes' : 'no'));
var_dump("stopped: " . (Timer::isStopped() ? 'yes' : 'no'));

sleep(5);

Timer::stop();

var_dump("started: " . (Timer::isStarted() ? 'yes' : 'no'));
var_dump("stopped: " . (Timer::isStopped() ? 'yes' : 'no'));
var_dump("elapsed: " . Timer::elapsed());
var_dump("raw: " . Timer::elapsedRaw());

sleep(2);

var_dump("'2nd timer' started: " . (Timer::isStarted('2nd timer') ? 'yes' : 'no'));
var_dump("'2nd timer' stopped: " . (Timer::isStopped('2nd timer') ? 'yes' : 'no'));
var_dump("'2nd timer' elapsed: " . Timer::elapsed('2nd timer'));
var_dump("'2nd timer' raw: " . Timer::elapsedRaw('2nd timer'));

sleep(2);

Timer::stop('2nd timer');

var_dump("'2nd timer' started: " . (Timer::isStarted('2nd timer') ? 'yes' : 'no'));
var_dump("'2nd timer' stopped: " . (Timer::isStopped('2nd timer') ? 'yes' : 'no'));
var_dump("'2nd timer' elapsed: " . Timer::elapsed('2nd timer'));
var_dump("'2nd timer' raw: " . Timer::elapsedRaw('2nd timer'));

Timer::setFormat('%.8f');
var_dump("'2nd timer' elapsed 8 decimals: " . Timer::elapsed('2nd timer'));

```

/// And you can instantiate it and do it all over again:

```
$t = new Timer;
$t->start();
sleep(3);
$t->stop();
var_dump("elapsed dynamic: " . $t->elapsed());

```

This should give you this result:

```
string(12) "started: yes"
string(11) "stopped: no"
string(11) "started: no"
string(12) "stopped: yes"
string(15) "elapsed: 5.0004"
string(20) "raw: 5.0005040168762"
string(24) "'2nd timer' started: yes"
string(23) "'2nd timer' stopped: no"
string(27) "'2nd timer' elapsed: 7.0008"
string(32) "'2nd timer' raw: 7.0008120536804"
string(23) "'2nd timer' started: no"
string(24) "'2nd timer' stopped: yes"
string(27) "'2nd timer' elapsed: 9.0011"
string(32) "'2nd timer' raw: 9.0010931491852"
string(42) "'2nd timer' elapsed 8 decimals: 9.00113106"
string(27) "elapsed dynamic: 3.00018883"

```

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity54

Moderate usage in the ecosystem

Community37

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 90.6% 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 ~66 days

Recently: every ~378 days

Total

57

Last Release

750d ago

PHP version history (2 changes)v0.2.0PHP &gt;=5.3.7

v0.2.3PHP &gt;=5.4.0

### Community

Maintainers

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

---

Top Contributors

[![antonioribeiro](https://avatars.githubusercontent.com/u/3182864?v=4)](https://github.com/antonioribeiro "antonioribeiro (203 commits)")[![Koozza](https://avatars.githubusercontent.com/u/1731647?v=4)](https://github.com/Koozza "Koozza (4 commits)")[![rogervila](https://avatars.githubusercontent.com/u/6053012?v=4)](https://github.com/rogervila "rogervila (3 commits)")[![fgreinus](https://avatars.githubusercontent.com/u/1236785?v=4)](https://github.com/fgreinus "fgreinus (3 commits)")[![ethanransdellrarebird](https://avatars.githubusercontent.com/u/48797338?v=4)](https://github.com/ethanransdellrarebird "ethanransdellrarebird (2 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")[![przemekperon](https://avatars.githubusercontent.com/u/169778?v=4)](https://github.com/przemekperon "przemekperon (1 commits)")[![swilla](https://avatars.githubusercontent.com/u/304159?v=4)](https://github.com/swilla "swilla (1 commits)")[![alr2413](https://avatars.githubusercontent.com/u/10116275?v=4)](https://github.com/alr2413 "alr2413 (1 commits)")[![vidhyut-pandya](https://avatars.githubusercontent.com/u/23421949?v=4)](https://github.com/vidhyut-pandya "vidhyut-pandya (1 commits)")[![chrisbjr](https://avatars.githubusercontent.com/u/571279?v=4)](https://github.com/chrisbjr "chrisbjr (1 commits)")[![cmorbitzer](https://avatars.githubusercontent.com/u/5883755?v=4)](https://github.com/cmorbitzer "cmorbitzer (1 commits)")[![cuonggt](https://avatars.githubusercontent.com/u/8156596?v=4)](https://github.com/cuonggt "cuonggt (1 commits)")[![drbyte](https://avatars.githubusercontent.com/u/404472?v=4)](https://github.com/drbyte "drbyte (1 commits)")

---

Tags

helperslaravelphplaravelpragmarx

### Embed Badge

![Health badge](/badges/pragmarx-support/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k129.4M822](/packages/barryvdh-laravel-ide-helper)[yajra/laravel-datatables-oracle

jQuery DataTables API for Laravel

4.9k35.3M364](/packages/yajra-laravel-datatables-oracle)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k449.3k30](/packages/tightenco-jigsaw)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9732.3M121](/packages/roots-acorn)[pragmarx/ia-arr

Laravel Illuminate Agnostic Arr

553.6M20](/packages/pragmarx-ia-arr)[pragmarx/ia-collection

Laravel Illuminate Agnostic Collection

473.4M2](/packages/pragmarx-ia-collection)

PHPackages © 2026

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