PHPackages                             codervio/stopwatch - 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. codervio/stopwatch

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

codervio/stopwatch
==================

Codervio Stopwatch

0111PHP

Since Apr 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Codervio/Stopwatch)[ Packagist](https://packagist.org/packages/codervio/stopwatch)[ RSS](/packages/codervio-stopwatch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Stopwatch
=========

[](#stopwatch)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ee948167ef23d560002596bbbe4bee2cbd2910b0a622d39368adaf21298fdc3d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f64657276696f2f73746f7077617463682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codervio/stopwatch)[![Build Status](https://camo.githubusercontent.com/9da89b9d2e5aa4f3f06eab050853470d8cb2c7fe3c10506884cbe701b20e146c/68747470733a2f2f7472617669732d63692e6f72672f436f64657276696f2f53746f7077617463682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Codervio/Stopwatch)[![Join the chat at https://gitter.im/Codervio/Stopwatch](https://camo.githubusercontent.com/20206234e30eb1355bbc3e52c9067535dc7a6b9dca5bea976ebe400b92e1725b/68747470733a2f2f6261646765732e6769747465722e696d2f436f64657276696f2f53746f7077617463682e737667)](https://gitter.im/Codervio/Stopwatch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A `Stopwatch` measures consumption time of executed scripts in micro/nano/mill seconds format. It includes `pause` event to freeze consumption time. A stopwatch time can be named as event stopwatch name. Support drivers using HRTime package or native microtime.

Donations
---------

[](#donations)

Due I am working 100% alone without any helps, organizations and any others team I can be satisfy for receiving any amount of payment to improve, develop and continue building on origin idea of framework.

You can pay any amount to PayPal: [https://www.paypal.me/codervio?locale.x=en\_US](https://www.paypal.me/codervio?locale.x=en_US)

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

[](#installation)

1. Installation via [Composer](http://www.composer.org) on [Packagist](https://packagist.org/packages/codervio/stopwatch)
2. Installation using [Git](http://www.github.com) GIT clone component

Changelog
---------

[](#changelog)

Status of core:

VersionState`1.0`Release versionPHP version above `7.1`. Quality assurance: Unit tests provided

#### References

[](#references)

- \[`Stopwatch`\] - A stopwatch constructor
- \[`setDriver`\] - Set Stopwatch driver type
- \[`getDriverName`\] - Get a class name of driver that is using
- \[`start`\] - Start method for stopwatch timer
- \[`stop`\] - Stop method for stopwatch timer
- \[`next`\] - Automatically start a new timer measurement
- \[`pause`\] - Start freezing timer of stopwatch
- \[`unpause`\] - Stop freezing timer of stopwatch
- \[`getDuration`\] - Get a duration time consumption
- \[`getEvent`\] - Fetch event name
- \[`getId`\] - Get Id
- \[`getTaskCount`\] - Get number of tasks executed
- \[`getTimeBorn`\] - Get at least first time executed
- \[`getPrettyPrint`\] - Print in a table view rendered stopwatch events

#### GetEvent methods

[](#getevent-methods)

- \[`getDuration`\] - Fetch duration of event
- \[`getStart`\] - Get time of started event
- \[`getStop`\] - Get time of stop event
- \[`getType`\] - Get a type of event (run or pause)
- \[`isStopped`\] - Check is event stopped
- \[`isStarted`\] - Check is event started

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.8% 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.

### Community

Maintainers

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

---

Top Contributors

[![marinsagovac](https://avatars.githubusercontent.com/u/8504733?v=4)](https://github.com/marinsagovac "marinsagovac (23 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

consumptionexecutionphp-timerstopwatchtimer

### Embed Badge

![Health badge](/badges/codervio-stopwatch/health.svg)

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

PHPackages © 2026

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