mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-25 05:59:11 +00:00
SDL_DelayNS() will attempt to sleep exactly the requested amount of time
This provides a highly accurate sleep function for your application, although you are still subject to being switched out occasionally. Fixes https://github.com/libsdl-org/SDL/issues/10210
This commit is contained in:
parent
54366181c3
commit
033df70d4c
12 changed files with 62 additions and 11 deletions
include/SDL3
|
@ -115,8 +115,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
|
|||
* Wait a specified number of nanoseconds before returning.
|
||||
*
|
||||
* This function waits a specified number of nanoseconds before returning. It
|
||||
* waits at least the specified time, but possibly longer due to OS
|
||||
* scheduling.
|
||||
* will attempt to wait as close to the requested time as possible, busy waiting
|
||||
* if necessary, but could return later due to OS scheduling.
|
||||
*
|
||||
* \param ns the number of nanoseconds to delay.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue