Use Windows own high resolution timer for timing things instead of the SDL timer #106

Merged
alufolie91 merged 8 commits from win32timer into Saturn-Next 2024-03-17 13:47:00 +01:00
alufolie91 commented 2024-02-11 11:41:50 +01:00 (Migrated from github.com)

While the SDL timer is fine enough, its just simply not as accurate as things could be
This uses windows own high resolution timer function (apparently (<1us) precision) in Place
unix uses its own for a few parts already so why should windows not use its own version
This potentially improves Frame Pacing with Vsync and or Capped Framerate, making things less stuttery and or jittery
aswell as making everything else more accurate which used those timing functions (ex Perfstats)
This should also lower the games CPU usage when it sleeps (ex when framerate is capped)

While the SDL timer is fine enough, its just simply not as accurate as things could be This uses windows own high resolution timer function (apparently (<1us) precision) in Place unix uses its own for a few parts already so why should windows not use its own version This potentially improves Frame Pacing with Vsync and or Capped Framerate, making things less stuttery and or jittery aswell as making everything else more accurate which used those timing functions (ex Perfstats) This should also lower the games CPU usage when it sleeps (ex when framerate is capped)
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: saturn/SRB2Kart-Saturn#106