Skip to content

Thread Timing Improvements#37

Merged
math0898 merged 13 commits intov3.0.0from
fps-improvements
May 26, 2025
Merged

Thread Timing Improvements#37
math0898 merged 13 commits intov3.0.0from
fps-improvements

Conversation

@math0898
Copy link
Copy Markdown
Owner

  • Improves the timing of threads making them more accurate to target refresh rates.
  • Adds new tests to validate threads are working properly.

- Designed and partially tested an algorithm which more closely hits target frame rates.
- Optimized imports.
- Weakened GraphicsPanel object in GraphicsThread to GraphicsPanelInterface.
- Added repaint() to GraphicsPanelInterface. This is typically implemented by Component. [API CHANGE!!!]
- Created GraphicsThreadTest.
- Started writing test for run().
- Slightly modified algorithm which did result in an 'overperformance' error of 1.5%. After removing some 'unused code' now at roughly 9%.
- Created parameterized test for running at requested frame rate.
- Updated Gradle wrapper to Gradle 7.5.
- Shortened test durations.
- Made tests automatically pause with an easy way to re-enable them.
- 'Normalized' the 'remainingMillis' count when determining how long to wait by subtracting the start time.
- Added a simple report result message so tests can still be useful.
- Added setters and getters for the current target frame rate.
@math0898 math0898 self-assigned this May 26, 2025
@math0898 math0898 added the minor version A implementation change, small new feature, optimization, or deprecation change. label May 26, 2025
@math0898 math0898 merged commit 8734d84 into v3.0.0 May 26, 2025
3 checks passed
@math0898 math0898 deleted the fps-improvements branch May 26, 2025 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor version A implementation change, small new feature, optimization, or deprecation change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant