mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Introduce and start using microsecond sleep on Linux (#13445)
This commit is contained in:
@@ -4262,8 +4262,8 @@ void FpsControl::limit(IrrlichtDevice *device, f32 *dtime)
|
||||
|
||||
if (busy_time < frametime_min) {
|
||||
sleep_time = frametime_min - busy_time;
|
||||
if (sleep_time > 1000)
|
||||
sleep_ms(sleep_time / 1000);
|
||||
if (sleep_time > 0)
|
||||
sleep_us(sleep_time);
|
||||
} else {
|
||||
sleep_time = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user