Skip to content

Commit

Permalink
test always use SDL_DelayNS
Browse files Browse the repository at this point in the history
  • Loading branch information
Susko3 committed Oct 17, 2024
1 parent abb2aa6 commit 3669fac
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions osu.Framework/Timing/ThrottledFrameClock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,7 @@ private double sleepAndUpdateCurrent(double milliseconds)

double before = CurrentTime;

TimeSpan timeSpan = TimeSpan.FromMilliseconds(milliseconds);

if (!waitWaitableTimer(timeSpan))
{
if (FrameworkEnvironment.UseSDL3)
SDL3.SDL_DelayNS((ulong)(milliseconds * SDL3.SDL_NS_PER_MS));
else
Thread.Sleep(timeSpan);
}
SDL3.SDL_DelayNS((ulong)(milliseconds * SDL3.SDL_NS_PER_MS));

return (CurrentTime = SourceTime) - before;
}
Expand Down

0 comments on commit 3669fac

Please sign in to comment.