Timers 1.4.2: ProPresenter digits no longer flick back a second
ProPresenter reports running timers as truncated whole seconds, and the poller re-anchored the tiles' local count at the bottom of that second on every 500 ms poll — so the displayed digit ran up to a second ahead and got yanked back a step whenever a fresh poll sampled the next flip later than the last one did. Tiles flickered ...12:33 → 12:34 → 12:33... about once a second. phase.js turns the quantized reports into one stable anchor per timer: the only information in a poll is a FLIP (the report stepping one second in the direction of travel), which dates the true boundary to the midpoint of the two polls that straddle it. While reports stay consistent with the anchor (±450 ms) the anchor holds, so tiles count along one steady clock; a report the anchor can't explain (reset, seek, resume, accumulated drift) re-anchors. Timers carry the anchor as a per-timer asOf the client extrapolates from (optional in the provider contract, documented in the guide); the client additionally refuses to tick a running card backwards over sub-1.5 s jitter. phase.selftest.js (66 checks) drives a simulated ProPresenter — truncated reports, jittered polls — through the tracker and the client's render math: digits never step backwards, dwells hold 1 s (the ~2 s zero-crossing dwell is trunc's honest behavior), anchors stay within tolerance of the true value, resets snap, pause/resume re-locks, 0.2% clock drift is absorbed. Verified live against tools/pp-timers-mock.js: 78 s of 100 ms DOM sampling across four running cards — every step ±1 in the card's own direction, dwells 998–1002 ms, zero regressions; upstream kill/restart still recovers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
7a736b3db1
commit
2f4c357bf5
@@ -684,6 +684,7 @@ clock, and any module that offers some. A module offers timers by:
|
||||
| `state` | `running`, `paused`, `stopped` (finished; value frozen), `idle` (exists, hasn't started — a timer that will start at 11:00). |
|
||||
| `startedAt` | ms epoch when it last started running; the consumer extrapolates from here, so a running timer never needs a fast poll. |
|
||||
| `elapsedMs`, `remainingMs` | The values at `updatedAt`; `null` when not meaningful for the kind. |
|
||||
| `asOf` | Optional, per timer: ms epoch this timer's durations were measured, when that differs from the snapshot's `updatedAt` (e.g. a value phase-locked to an upstream's second flips). Consumers extrapolate from it instead. |
|
||||
| `targetMs` | Planned length (elapsed) or full length (countdown), or `null`. Lets the consumer colour overruns. |
|
||||
| `status` | Optional one-liner the consumer shows beside the time — the current item, "ahead 1:20". `tone`: `ok`, `warn`, `danger`, `muted`. |
|
||||
| `detail` | Optional second line. |
|
||||
|
||||
Reference in New Issue
Block a user