Skip to content

fix: Accurate game clock and correct segment highlight dispatch#5

Merged
JRemitz merged 1 commit intomainfrom
fix/clock-accuracy-and-segment-highlights
Mar 28, 2026
Merged

fix: Accurate game clock and correct segment highlight dispatch#5
JRemitz merged 1 commit intomainfrom
fix/clock-accuracy-and-segment-highlights

Conversation

@JRemitz
Copy link
Copy Markdown
Contributor

@JRemitz JRemitz commented Mar 27, 2026

Summary

  • Clock accuracy: on_tick() assumed exactly 100ms between Qt timer fires, causing the game clock to drift fast. Now uses QElapsedTimer to measure actual wall-clock elapsed time with remainder tracking so fractional tenths aren't lost.
  • Segment highlights: The highlights button always ran reeln game highlights regardless of the "Game Finished" checkbox state. Now correctly dispatches reeln game segment <N> (integer period number) when unchecked, and reeln game highlights when checked. Hotkey follows the same logic.
  • Button label: Now includes the period number (e.g. "Generate Period 1 Highlights") for clarity.

Test plan

  • Start a game clock, let it run for 60 real seconds — verify the displayed clock matches wall time
  • With "Game Finished" unchecked, click highlights button — verify CLI job shows reeln game segment 1 (not reeln game highlights)
  • Advance to OT, click highlights button — verify CLI job shows reeln game segment 4
  • Check "Game Finished", click highlights button — verify CLI job shows reeln game highlights
  • Verify highlights hotkey follows the same dispatch logic

🤖 Generated with Claude Code

The game clock drifted fast because on_tick() assumed exactly 100ms
between Qt timer fires. Now measures actual wall-clock elapsed time
via QElapsedTimer with remainder tracking.

The highlights button always ran `reeln game highlights` regardless
of the "Game Finished" checkbox. Now dispatches `reeln game segment <N>`
(with integer period number) when unchecked, and `reeln game highlights`
when checked. Hotkey follows the same logic.

Co-Authored-By: Claude <noreply@anthropic.com>
@JRemitz JRemitz merged commit ec8e920 into main Mar 28, 2026
7 checks passed
@JRemitz JRemitz deleted the fix/clock-accuracy-and-segment-highlights branch March 28, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant