actually use the sys_sleep function

This commit is contained in:
fgsfds 2020-11-02 19:39:40 +03:00
parent 191db465fc
commit 70b281405f
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ static inline void sync_framerate_with_timer(void) {
const double elapsed = last_sec ? (now - last_sec) : (now - last_time);
if ((elapsed < frame_time && !last_sec) || (elapsed < frames_since_last_sec * frame_time && last_sec)) {
const double delay = last_sec ? frames_since_last_sec * frame_time - elapsed : frame_time - elapsed;
usleep(delay / perf_freq * 1000000.0);
sys_sleep(delay / perf_freq * 1000000.0);
last_time = now + delay;
} else {
last_time = now;