News for hackers. Stuff that matters.
Re:Minimal Cross-Platform Graphics by bob1029 on Tuesday January 24, 2023 @05:27AM (#34501893)
> Windows' Sleep() function has default resolution 15.6ms, that's not enough for realtime rendering, and relatively hard to fix

Very easy to fix. Call this at the start of your real-time process:

https://learn.microsoft.com/en-us/windows/win32/api/timeapi/...

Use an argument of 1, and windows will come knocking at ~1Khz. This is extremely effective in my experience. Allows you to do some pretty crazy stuff on 1 thread.

There are no comments on this comment yet.