-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
The readableElapsedTime function supports a $round parameter, but this isn't passed to the ms output.
If this is passed and the $format is removed it will work with sub millisecond times
public static function readableElapsedTime($microtime, $format = null, $round = 4)
{
if (is_null($format)) {
$format = '%.3f%s';
}
if ($microtime >= 1) {
$unit = 's';
$time = round($microtime, $round);
} else {
$unit = 'ms';
$time = round($microtime*1000, $round);
// $format = preg_replace('/(%.[\d]+f)/', '%d', $format);
}
return sprintf($format, $time, $unit);
}
Previously we would get results as 0ms, now they say 0.234ms
Would you consider implementing this?
Metadata
Metadata
Assignees
Labels
No labels