mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-04 08:33:39 +02:00
Show microseconds
Many small PDO queries will report 0ms. This will show microseconds when appropriate.
This commit is contained in:
@ -52,7 +52,9 @@ abstract class DataCollector implements DataCollectorInterface
|
||||
*/
|
||||
public function formatDuration($seconds)
|
||||
{
|
||||
if ($seconds < 1) {
|
||||
if($seconds < 0.001){
|
||||
return round($seconds * 1000000) . 'μs';
|
||||
}elseif ($seconds < 1) {
|
||||
return round($seconds * 1000) . 'ms';
|
||||
}
|
||||
return round($seconds, 2) . 's';
|
||||
|
Reference in New Issue
Block a user