mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 01:13:55 +00:00
chore: remove unused code
This commit is contained in:
committed by
Carlos Valente
parent
30e290c320
commit
0ea00ff6be
@@ -156,26 +156,6 @@ export function getRuntimeOffset(state: RuntimeState): number {
|
||||
return startOffset - addedTime - pausedTime + overtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates total duration of a time span
|
||||
* @param firstStart
|
||||
* @param lastEnd
|
||||
* @param daySpan
|
||||
* @returns
|
||||
*/
|
||||
export function getTotalDuration(firstStart: number, lastEnd: number, daySpan: number): number {
|
||||
if (!lastEnd) {
|
||||
return 0;
|
||||
}
|
||||
let correctDay = 0;
|
||||
if (lastEnd < firstStart) {
|
||||
correctDay = dayInMs;
|
||||
daySpan -= 1;
|
||||
}
|
||||
// eslint-disable-next-line prettier/prettier -- we like the clarity
|
||||
return lastEnd + correctDay + daySpan * dayInMs - firstStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the expected end of the rundown
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user