MCPcopy Create free account
hub / github.com/ShipSecAI/studio / formatDuration

Function formatDuration

frontend/src/components/timeline/NetworkPanel.tsx:105–109  ·  view source on GitHub ↗
(ms?: number)

Source from the content-addressed store, hash-verified

103};
104
105const formatDuration = (ms?: number): string => {
106 if (ms === undefined || ms < 0) return '-';
107 if (ms < 1000) return `${Math.round(ms)}ms`;
108 return `${(ms / 1000).toFixed(2)}s`;
109};
110
111const formatBytes = (bytes?: number): string => {
112 if (bytes === undefined || bytes < 0) return '-';

Callers 3

TimingBarFunction · 0.70
RequestDetailFunction · 0.70
NetworkPanelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected