http://pastebin.com/fUjyXH9J

This is part of the package, the full package will be available soon!

Simple application using it:
PHP Code:
<?php
$b 
singleton::instance('\benchmark\tools');
for(
$i 0$i != 1000$i++)
{
   
$b->start();
   echo 
'hello ';
   
$b->stop();
   echo 
'in ' $b->end(5) . '<br/>'# 5 decimal places.
   
$b->flush();
}
Or with the new update instead of
PHP Code:
   $b->stop();
   echo 
'in ' $b->end(5) . '<br/>'
You could have:
PHP Code:
   echo 'in ' $b->stop()->end(5) . '<br/>'
!! How cool! Function chaining!

Remember you don't have to flush! You can keep it in the functions variables. Just remember to use singleton! We don't want to be starting multiple timers now, do we?