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

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

sunxyw/pragmarx-support
=======================

PragmaRX components support package

v0.9.3(5y ago)04BSD-3-ClausePHPPHP &gt;=5.4.0

Since Feb 28Pushed 4y agoCompare

[ Source](https://github.com/sunxyw/support)[ Packagist](https://packagist.org/packages/sunxyw/pragmarx-support)[ RSS](/packages/sunxyw-pragmarx-support/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (55)Used By (0)

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

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 92.2% 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 ~45 days

Recently: every ~240 days

Total

54

Last Release

2050d 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/0074b4d8ef244d2d516e67fe7949e287b37eeee02d4adfa0da953077bf7e0121?d=identicon)[sunxyw](/maintainers/sunxyw)

---

Top Contributors

[![antonioribeiro](https://avatars.githubusercontent.com/u/3182864?v=4)](https://github.com/antonioribeiro "antonioribeiro (200 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)")[![sunxyw](https://avatars.githubusercontent.com/u/31698606?v=4)](https://github.com/sunxyw "sunxyw (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)")[![drbyte](https://avatars.githubusercontent.com/u/404472?v=4)](https://github.com/drbyte "drbyte (1 commits)")

---

Tags

laravelpragmarx

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

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

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[yajra/laravel-datatables-oracle

jQuery DataTables API for Laravel

4.9k33.8M335](/packages/yajra-laravel-datatables-oracle)[pragmarx/support

PragmaRX components support package

591.5M27](/packages/pragmarx-support)[pragmarx/ia-arr

Laravel Illuminate Agnostic Arr

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

Laravel Illuminate Agnostic Collection

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

Laravel Illuminate collection with objectified properties

943.4M11](/packages/pragmarx-coollection)

PHPackages © 2026

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