SDL_Delay(3)

hey bestie πŸ’– welcome to the SDL_Delay(3) page, straight outta SDL3 FUNCTIONS. it's giving timer vibes, and you're gonna slay this. let's get into it ✨

πŸŽ€ NAME πŸŽ€

SDL_Delay β€” okay so this function literally waits a specified number of milliseconds before returning. no cap, that's the whole job. πŸ’…

✨ SYNOPSIS ✨

okay so first you gotta include this header:

#include <SDL3/SDL_timer.h>

and then the function signature is:

void SDL_Delay(Uint32 ms);

πŸ’– DESCRIPTION πŸ’–

This function waits a specified number of milliseconds before returning. it waits at least the specified time, but possibly longer due to OS scheduling. so like, don't expect it to be exact, bestie β€” the OS is the main character here and it might make you wait a lil extra. 😭

🌸 FUNCTION PARAMETERS 🌸

  • ms β€” the number of milliseconds to delay. that's it, that's the whole parameter. iconic. πŸ‘‘

πŸ¦‹ THREAD SAFETY πŸ¦‹

It is safe to call this function from any thread. so go off, call it from literally any thread you want, no cap. πŸ’―

⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. so if you're on an older version, sorry bestie, you're missing out. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯


xoxo, that's the whole page πŸ’– brought to you by Simple Directmedia Layer, version SDL 3.4.18, and the one and only SDL_Delay(3). periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from