round duration to the second
This commit is contained in:
parent
955aab2152
commit
302ef63485
|
|
@ -415,7 +415,7 @@ function statusLabel(job: CronJob): string {
|
||||||
function formatDuration(ms?: number): string {
|
function formatDuration(ms?: number): string {
|
||||||
if (!ms) return '-'
|
if (!ms) return '-'
|
||||||
if (ms < 1000) return `${ms}ms`
|
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`
|
return `${Math.round(ms / 60000)}m`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user