From 526c85773f805c39a593eb348624e4327b106fa3 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Wed, 6 May 2020 11:33:08 +0200 Subject: [PATCH] Replace deprectared usleep() calls --- src/core.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/core.c b/src/core.c index b01f15138..4ce2c04b8 100644 --- a/src/core.c +++ b/src/core.c @@ -5055,10 +5055,7 @@ static void *EventThread(void *arg) #endif } } - else - { - usleep(5000); // Sleep for 5ms to avoid hogging CPU time - } + else Wait(5); // Sleep for 5ms to avoid hogging CPU time } close(worker->fd); @@ -5146,10 +5143,7 @@ static void *GamepadThread(void *arg) } } } - else - { - usleep(1000); //Sleep for 1ms to avoid hogging CPU time - } + else Wait(1); // Sleep for 1 ms to avoid hogging CPU time } }