mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-26 05:15:27 +01:00
Improve sleep accuracy on FPS limiter (#15648)
This commit is contained in:
@@ -50,8 +50,7 @@ void FpsControl::limit(IrrlichtDevice *device, f32 *dtime, bool assume_paused)
|
||||
|
||||
if (busy_time < frametime_min) {
|
||||
sleep_time = frametime_min - busy_time;
|
||||
if (sleep_time > 0)
|
||||
sleep_us(sleep_time);
|
||||
porting::preciseSleepUs(sleep_time);
|
||||
} else {
|
||||
sleep_time = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user