use formatMs function to consistently format point times

This commit is contained in:
Alex Holliday committed 2026-07-31 12:40:18 -07:00
1 parent 65c6f567b5
commit 336dbe4de2
32 files changed
+153 -147

No files matched your search

+2 -3
View File
@@ -6,6 +6,7 @@ import prettyMilliseconds from "pretty-ms";
import { useTheme } from "@mui/material";
import { useTranslation } from "react-i18next";
import type { Diagnostics } from "@/Types/Diagnostics";
import { formatMs } from "@/Utils/TimeUtils";
interface StatsProps {
diagnostics: Diagnostics | null;
@@ -18,9 +19,7 @@ export const Stats = ({ diagnostics }: StatsProps) => {
const theme = useTheme();
const eventLoopDelay = diagnostics
? prettyMilliseconds(diagnostics.eventLoopDelayMs ?? 0, {
millisecondsDecimalDigits: 2,
})
? formatMs(diagnostics.eventLoopDelayMs ?? 0)
: PLACEHOLDER;
const uptime = diagnostics
? prettyMilliseconds(diagnostics.uptimeMs ?? 0, { hideSeconds: true })