PHPackages                             geekality/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. geekality/timer

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

geekality/timer
===============

Simple class for logging time and memory usage of stuff

v1.2(13y ago)1217.8k2CC-BYPHPPHP &gt;=5.3.0

Since Apr 7Pushed 13y ago2 watchersCompare

[ Source](https://github.com/Svish/TimerPHP)[ Packagist](https://packagist.org/packages/geekality/timer)[ Docs](https://github.com/Svish/TimerPHP)[ RSS](/packages/geekality-timer/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

Introduction
============

[](#introduction)

Simple class for logging time and memory usage of methods and such.

The `Timer::__toString()` method will create a simple plain text overview, but you can of course also create your own output by using the properties of the Timer objects directly.

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

[](#installation)

If you use [Composer](http://getcomposer.org), which I highly recommend, simply add the following dependency to your `composer.json`:

```
    "require":
    {
    	"geekality/timer": "1.*"
	},

```

Otherwise just download the file `Timer.php` from here and include it in your project. It's self-contained so you only need this one file.

Example usage
-------------

[](#example-usage)

```
Timer::start('root');
// Stuff
Timer::start('section');
// Sub section stuff
Timer::stop();
// More stuff
echo Timer::result();

```

Here is some sample output from the [sample/add.php](sample/add.php) script in this repo.

```
/TimerPHP/sample/add.php(3, 9)
 │
 │ 7.001 s
 │ 4.02 KiB, 732.41 KiB
 │
 ├ SlowMath::slowAdd(3, 9)
 │  │
 │  │ 4.001 s
 │  │ 432.00 B, 732.41 KiB
 │ ─┘
 │
 ├ test(null, true, false)
 │  │
 │  │ 2.000 s
 │  │ 176.00 B, 732.41 KiB
 │ ─┘

```

If you want to see some more extensive use of this class, you can check out my project, [Svish/MyHymnal](https://github.com/svish/MyHymnal). There I also dump the result to a file which you can load on [the website](http://myhymnal.net) by clicking a tiny *Debug* link in the bottom right corner.

License
=======

[](#license)

This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/).

[![Creative Commons License](https://camo.githubusercontent.com/011d72eeefe5ba12a3df6878a8693f73852fcd3627a7857c2dce5eb9401055ce/687474703a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f6c2f62792f332e302f38387833312e706e67)](https://camo.githubusercontent.com/011d72eeefe5ba12a3df6878a8693f73852fcd3627a7857c2dce5eb9401055ce/687474703a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f6c2f62792f332e302f38387833312e706e67)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

4751d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

timerbenchmarkingbenchmarkstatistics

### Embed Badge

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

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

###  Alternatives

[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k7.1M40](/packages/markrogoyski-math-php)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[devster/ubench

Micro PHP library for benchmarking

5701.0M29](/packages/devster-ubench)[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2751.4M5](/packages/rubix-tensor)[dragon-code/benchmark

Simple comparison of code execution speed between different options

11934.7k5](/packages/dragon-code-benchmark)[hi-folks/statistics

PHP package that provides functions for calculating mathematical statistics of numeric data.

398103.5k](/packages/hi-folks-statistics)

PHPackages © 2026

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