eleme/timer

PHP timer library

v0.1.0 2014-06-27 05:07 UTC

This package is not auto-updated.

Last update: 2024-11-05 03:29:55 UTC


README

Build Status Scrutinizer Code Quality Code Coverage Stable Status

thrift service provider for silex framework.

Install With Composer:

"require": {
    "eleme/timer": "~0.1"
}

Example:

<?php

use Eleme\Timer\Collection;

require __DIR__.'/../vendor/autoload.php';

$collection = new Collection('namespace');
$collection->start('test');
usleep(500000);
$collection->stop('test');
$collection->start('test');
usleep(1000000);
$collection->stop('test');
$collection->start('fast');
$collection->stop('fast');
foreach ($collection as $name => $timer) {
    echo $name, "\n";
    foreach ($timer->delta() as $value) {
        echo $value, "\n";
    }
}