mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-17 05:18:32 +01:00
commit
84986b1588
@ -52,8 +52,10 @@ abstract class DataCollector implements DataCollectorInterface
|
||||
*/
|
||||
public function formatDuration($seconds)
|
||||
{
|
||||
if ($seconds < 1) {
|
||||
return round($seconds * 1000) . 'ms';
|
||||
if ($seconds < 0.001) {
|
||||
return round($seconds * 1000000) . 'μs';
|
||||
} else if ($seconds < 1) {
|
||||
return round($seconds * 1000, 2) . 'ms';
|
||||
}
|
||||
return round($seconds, 2) . 's';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user