mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-03-15 11:50:01 +01:00
fix formatDuration NaNμs on timeline widget (#569)
This commit is contained in:
parent
7e0ef13788
commit
c13bd51cdb
@ -420,8 +420,10 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
var formatDuration = function(seconds) {
|
||||
if (seconds < 0.001)
|
||||
return (seconds * 1000000).toFixed() + 'μs';
|
||||
else if (seconds < 1)
|
||||
else if (seconds < 0.1)
|
||||
return (seconds * 1000).toFixed(2) + 'ms';
|
||||
else if (seconds < 1)
|
||||
return (seconds * 1000).toFixed() + 'ms';
|
||||
return (seconds).toFixed(2) + 's';
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user