Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eusonlito/timer

A simple timer mark script
https://github.com/eusonlito/timer

Last synced: 6 days ago
JSON representation

A simple timer mark script

Awesome Lists containing this project

README

        

Timer
=====

This script works as simple timer control to your app

Usage
--------
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();