mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
refactor: unify time constants
This commit is contained in:
committed by
Carlos Valente
parent
119e6caca3
commit
d05cc88748
@@ -4,6 +4,9 @@ export const MILLIS_PER_SECOND = 1000;
|
||||
export const MILLIS_PER_MINUTE = 1000 * 60;
|
||||
export const MILLIS_PER_HOUR = 1000 * 60 * 60;
|
||||
|
||||
export const dayInMs = 86400000;
|
||||
export const maxDuration = dayInMs - MILLIS_PER_SECOND;
|
||||
|
||||
function convertMillis(millis: MaybeNumber, conversion: number) {
|
||||
if (!millis) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user