2017 © Pedro Peláez
 

library timer

A Simple Timer mark script

image

ans/timer

A Simple Timer mark script

  • Wednesday, August 22, 2012
  • by eusonlito
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Timer

This script works as simple timer control to your app, (*1)

Usage

<?php
include (__DIR__.'/libs/ANS/Timer/Timer.php');

$Timer = new \ANS\Timer\Timer;

$Timer->mark('Starting a mark previous to operations');

foreach ($alotofoperations as $operation) {
    $Timer->mark('Start operation '.$operation->name);

    $operation->function();

    $Timer->mark('End operation '.$operation->name);
}

$Timer->mark('Ended a mark previous to operations');

foreach ($Timer->get() as $timer) {
    echo "\n".sprintf('%01.6f', $timer['total']).' - '.$timer['text'];
}

echo "\n".$Timer->getMemoryUsage();

The Versions

22/08 2012

dev-master

9999999-dev https://github.com/eusonlito/Timer/

A Simple Timer mark script

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.3

 

php timer