Skip to content

Commit 40f3755

Browse files
authored
Skip decimals if < 100ms
1 parent 2009a58 commit 40f3755

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/DebugBar/DataFormatter/DataFormatter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ public function formatDuration($seconds)
5454
{
5555
if ($seconds < 0.001) {
5656
return round($seconds * 1000000) . 'μs';
57-
} elseif ($seconds < 1) {
57+
} elseif ($seconds < 0.1) {
5858
return round($seconds * 1000, 2) . 'ms';
59+
} elseif ($seconds < 1) {
60+
return round($seconds * 1000) . 'ms';
5961
}
6062
return round($seconds, 2) . 's';
6163
}

0 commit comments

Comments
 (0)