Repository navigation
Fix: Drive Windows frame time from the monotonic clock (PR-3, #69) - #588
Merged
Merged
Conversation
Both Windows renderers stepped a 16 ms counter per frame, so animations ran ahead of real time at 120/144 Hz. The native image window (desktop/src/Win32Window.kt) and the Kotlin/Native window and backend (windows/src) now share WindowFrameTime, which reads the monotonic clock and stays strictly increasing. Covers the PR-3 criterion that frame_time_nanos is the monotonic nanosecond clock.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #69
Both Windows renderers take each frame's time from the monotonic clock (shared WindowFrameTime helper) instead of adding 16 ms per painted frame, so animations run at real speed at 120/144 Hz.
Verified: ./kotlin test -m desktop WindowFrameTimeTest 4/4 (local builder); Windows x64 Kotlin/Native static renderer and the GraalVM Windows smoke test built and ran with it in dispatched run 43315954332 (batch with #590/#598). The GraalVM Win32 window moves to the fork's graalvm-windows module in #614, which closes #69.