MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / formatCountdown

Function formatCountdown

cli/src/components/status-bar.tsx:51–57  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

49const COUNTDOWN_VISIBLE_MS = 5 * 60_000
50
51const formatCountdown = (ms: number): string => {
52 if (ms <= 0) return 'expiring…'
53 const totalSeconds = Math.ceil(ms / 1000)
54 const m = Math.floor(totalSeconds / 60)
55 const s = totalSeconds % 60
56 return `${m}:${s.toString().padStart(2, '0')}`
57}
58
59const formatSessionRemaining = (ms: number): string => {
60 if (ms <= 0) return 'expiring…'

Callers 2

formatSessionRemainingFunction · 0.85
StatusBarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected