Commit 6bd8b20
committed
feat(T-Timers): Add calculateTimerDuration helper function
Add calculateTimerDuration() function to calculate current timer duration
from TimerState, handling all three cases:
- Manually paused or already pushing
- Auto-pause at overrun (pauseTime)
- Running normally
Clients can import and use:
import { calculateTimerDuration } from '@sofie-automation/corelib/dist/dataModel/RundownPlaylist'
const duration = calculateTimerDuration(timer.state, getCurrentTime())1 parent bac92cc commit 6bd8b20
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
167 | 188 | | |
168 | 189 | | |
169 | 190 | | |
| |||
0 commit comments