Skip to contentOpen History to see the last commit
DiagnosticsSettings.logic.ts
5 lines255 Bytes
1export function formatDiagnosticsDuration(value: number): string { 2 const milliseconds = Math.round(value); 3 if (milliseconds < 1_000) return `${milliseconds} ms`; 4 return `${(value / 1_000).toFixed(value >= 10_000 ? 1 : 2).replace(/\.0+$/, "")} s`;