Replace deprectared usleep() calls
This commit is contained in:
parent
845596c30a
commit
526c85773f
1 changed files with 2 additions and 8 deletions
10
src/core.c
10
src/core.c
|
@ -5055,10 +5055,7 @@ static void *EventThread(void *arg)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else Wait(5); // Sleep for 5ms to avoid hogging CPU time
|
||||||
{
|
|
||||||
usleep(5000); // Sleep for 5ms to avoid hogging CPU time
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close(worker->fd);
|
close(worker->fd);
|
||||||
|
@ -5146,10 +5143,7 @@ static void *GamepadThread(void *arg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else Wait(1); // Sleep for 1 ms to avoid hogging CPU time
|
||||||
{
|
|
||||||
usleep(1000); //Sleep for 1ms to avoid hogging CPU time
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue