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

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

giraffesummer/stopwatch
=======================

1.0.7(3y ago)0256↓100%PHPPHP &gt;=8.1

Since Oct 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/GiraffeSummer/laravel-stopwatch)[ Packagist](https://packagist.org/packages/giraffesummer/stopwatch)[ RSS](/packages/giraffesummer-stopwatch/feed)WikiDiscussions main Synced 1mo ago

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

Stopwatch
=========

[](#stopwatch)

Install: `composer require giraffesummer/stopwatch`

Time your functions, commands and tasks stopwatch style using this package.

It's build with Laravel (9) in mind, but it *might* work without it.

It's super easy to get started, there's only 3 functions:

Getting started
---------------

[](#getting-started)

You can start using the stopwatch by creating a new instance of it.

import `GiraffeSummer\Stopwatch\Stopwatch`

```
use GiraffeSummer\Stopwatch\Stopwatch;

$sw = new Stopwatch();
```

### Functions

[](#functions)

The functions Start and Lap will return a formatted time string.

#### Start

[](#start)

Start will return the starting time of the stopwatch.
This should always be: `00:00:00.000`
usage:

```
$sw->start(); //00:00:00.000
```

#### Lap

[](#lap)

Lap is equivalent to the lap button on a stopwatch,
this will show the current elapsed time of the stopwatch,
since it was started or reset.
usage:

```
$sw->lap(); //00:00:05.9547
```

#### Reset

[](#reset)

Reset will reset the time back to 0.
usage:

```
$sw->reset();
```

### Example

[](#example)

here's an example of it all together.

```
$sw = new Stopwatch();
echo $sw->start();
$sleep = rand(1, 5);
echo "sleep: " . $sleep;
sleep($sleep);
echo $sw->lap();
```

This will sleep for a random number of seconds between 1 and 5, and lap before and after to see how long it was.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

7

Last Release

1262d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13758194ff493c4bccff2f0e46183b6096dd7c87fc60f32f8ffc6ad2a8f3dc26?d=identicon)[GiraffeSummer](/maintainers/GiraffeSummer)

---

Top Contributors

[![GiraffeSummer](https://avatars.githubusercontent.com/u/39410674?v=4)](https://github.com/GiraffeSummer "GiraffeSummer (11 commits)")

### Embed Badge

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

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

###  Alternatives

[ashallendesign/short-url

A Laravel package for creating shortened URLs for your web apps.

1.4k1.9M4](/packages/ashallendesign-short-url)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[intervention/zodiac

Zodiac Sign Calculator

58191.7k](/packages/intervention-zodiac)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[solspace/craft-calendar

The most powerful event management and calendaring plugin!

1830.8k1](/packages/solspace-craft-calendar)

PHPackages © 2026

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