well i have wrote my simple benchmark class and it works great except, I would like to fine tune output to make it more user friendly. My question is my output is usally around 0.0005 how can i fine tune this to have something like 0.05
would i just need to loose some decimal positions?
class benchmark
{
private static $marker = array();
public static function start()
{
self::$marker['start'] = microtime(true);
}
public static function end()
{
self::$marker['end'] = microtime(true);
}
public static function mark($name)
{
self::$marker[$name] = microtime(true);
}
public static function elapsed($point1, $point2, $decimals = 4)
{
return number_format(self::$marker[$point2] - self::$marker[$point1], $decimals);
}
}