mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-06 16:03:52 +00:00
93170fbc69
The gap/overlap detection is already a merge-intervals sweep: `latestEvent` is the running max end and `getTimeFrom` is `start - maxEnd`. Making that explicit collapses the branching around it. - getTimeFrom: the three branches all returned the same subtraction - totalDuration: the gap === 0 / gap > 0 / gap < 0 cases are all Math.max(duration + gap, 0), since duration is never negative Same behaviour, no signature changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016XSraCPafWbAg35gAFrtgH