round duration to the second

This commit is contained in:
Chris Wanstrath 2026-02-09 21:32:11 -08:00
parent 955aab2152
commit 302ef63485

View File

@ -415,7 +415,7 @@ function statusLabel(job: CronJob): string {
function formatDuration(ms?: number): string {
if (!ms) return '-'
if (ms < 1000) return `${ms}ms`
if (ms < 60000) return `${(ms / 1000).toFixed(1)}s`
if (ms < 60000) return `${Math.round(ms / 1000)}s`
return `${Math.round(ms / 60000)}m`
}