mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-17 05:18:32 +01:00
Show microseconds
Many small PDO queries will report 0ms. This will show microseconds when appropriate.
This commit is contained in:
parent
3e0c9e3b4c
commit
9e9ca24a62
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user