PHPackages                             travail/time-chronograph - 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. travail/time-chronograph

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

travail/time-chronograph
========================

travail/time-chronograph

v0.1.0(12y ago)2179.4k↓100%2PHP-3.0PHP

Since May 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/travail/php-Time-Chronograph)[ Packagist](https://packagist.org/packages/travail/time-chronograph)[ RSS](/packages/travail-time-chronograph/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

\\Time\\Chronograph
===================

[](#timechronograph)

NAME
----

[](#name)

\\Time\\Chronograph -

SYNOPSIS
--------

[](#synopsis)

```
use \Time\Chronograph;

require_once '/path/to/vendor/autoload.php';

$chrono = new Chronograph();
$chrono->start();

$chrono->mark('before_do_something');
/* Do something */
$chrono->mark('after_do_something');

$chrono->stop();

$diff = $chrono->diff('before_do_something', 'after_do_something');
echo sprintf("Took %.3f to do something", $diff);

$total = $chrono->total();
echo sprintf("Took %.3f seconds\n", $total);
$total_in_micro_seconds = $chrono->total(6);
echo sprintf("Took %.6f seconds\n", $total_in_micro_seconds);
```

INSTALLATION
------------

[](#installation)

To install this package into your project via composer, add the following snippet to your `composer.json`. Then run `composer install`.

```
"require": {
    "travail/time-chronograph": "dev-master"
}

```

If you want to install from gihub, add the following:

```
"repositories": [
    {
        "type": "vcs",
        "url": "git@github.com:travail/php-Time-Chronograph.git"
    }
]

```

METHODS
-------

[](#methods)

### mark

[](#mark)

#### Description

[](#description)

`float mark(string $mark)`

Returns the result of `gettimeofday`.

#### Parameters

[](#parameters)

- $mark

### start

[](#start)

#### Description

[](#description-1)

`void start(void)`

### stop

[](#stop)

#### Description

[](#description-2)

`void stop(void)`

### total

[](#total)

#### Description

[](#description-3)

`float total([int $digit = 3])`

Returns the time between the mark `$start` and `$end` in given decimal place, 3 (millisecond) by default.

#### Parameters

[](#parameters-1)

- $digit

### diff

[](#diff)

#### Description

[](#description-4)

`float diff(string $start, strig $end [, int $digit = 3])`

Returns the time between the mark `$start` and `$end` in given decimal place, millisecond by default.

#### Parameters

[](#parameters-2)

- $start
- $end
- $digit

### AUTHOR

[](#author)

travail

### LICENSE

[](#license)

This library is free software. You can redistribute it and/or modify it under the same terms as PHP itself.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

4392d ago

### Community

Maintainers

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

---

Top Contributors

[![travail](https://avatars.githubusercontent.com/u/52314?v=4)](https://github.com/travail "travail (17 commits)")[![tisogawa](https://avatars.githubusercontent.com/u/145603?v=4)](https://github.com/tisogawa "tisogawa (1 commits)")[![visavi](https://avatars.githubusercontent.com/u/826831?v=4)](https://github.com/visavi "visavi (1 commits)")

### Embed Badge

![Health badge](/badges/travail-time-chronograph/health.svg)

```
[![Health](https://phpackages.com/badges/travail-time-chronograph/health.svg)](https://phpackages.com/packages/travail-time-chronograph)
```

###  Alternatives

[astrotomic/laravel-webmentions

215.7k](/packages/astrotomic-laravel-webmentions)

PHPackages © 2026

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