import { clock } from "@/app/fonts" import { cn } from "@/lib/utils" import { splitElapsedTime } from "../utils/splitElapsedTime" import { zeroPad } from "../utils/zeroPad" import { Separator } from "../Separator" export function Counter({ valueInMs, color }: { valueInMs: number color: string }) { const { hours, minutes, seconds, milliseconds } = splitElapsedTime(valueInMs) return (
{ zeroPad(hours || 0) }{ zeroPad(minutes || 0) }{ zeroPad(seconds || 0) }{ zeroPad(Math.min(999, milliseconds || 0)).slice(0, 2) }
) }