al_rest(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’… al_rest(3)

okay so this is a page from the Library Functions Manual β€” yes, the Library Functions Manual, we're being fancy today β€” and it's all about al_rest, a lil function from the Allegro 5 API πŸŽ€


✨ NAME ✨

al_rest β€” Allegro 5 API πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro.h>

void al_rest(double seconds)

like, that's the whole thing. one include, one function. iconic minimalism πŸ’…


🌸 DESCRIPTION 🌸

So al_rest waits for the number of seconds you give it. yep, that's the vibe β€” it tells the system to pause the current thread for however long you asked for ⏸️

Bestie, here's the part you gotta know: on some operating systems the accuracy can be in the order of 10ms. like, "in the order of" β€” so don't come for me when it's not perfectly precise 😭

That means even something like this:

al_rest(0.000001)

might pause for something like 10ms. yeah. a whole 10ms for a microsecond request. it's giving "close enough" πŸ’€

fr fr, don't build your entire timing system on this being nano-precise, okay? πŸ™ˆ

Also β€” and this is the good part β€” go check out the section on Timer routines for easier ways to time your program without using up all your CPU πŸ”₯ your processor will literally thank you 🫢


πŸ‘‘ sign-off πŸ‘‘

that's the whole page, bestie! this little reference lives in the Allegro reference manual, filed under al_rest(3). no cap, that's genuinely all of it πŸŒˆβœ¨πŸ’œ

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms