mirror of
https://github.com/liriliri/eruda.git
synced 2026-04-01 10:18:35 +08:00
Fix: Network display and content length
This commit is contained in:
@@ -113,6 +113,7 @@ export default class Network extends Tool
|
||||
util.extend(target, data);
|
||||
|
||||
target.time = target.time - target.startTime;
|
||||
target.displayTime = formatTime(target.time);
|
||||
|
||||
this._render();
|
||||
}
|
||||
@@ -272,4 +273,11 @@ export default class Network extends Tool
|
||||
requests: this._requests
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
function formatTime(time)
|
||||
{
|
||||
if (time < 1000) return time + 'ms';
|
||||
|
||||
return (time / 1000).toFixed(1) + 's';
|
||||
}
|
||||
Reference in New Issue
Block a user