rest_callback(3alleg4)

✨ rest_callback ✨

okay bestie, so this is a page from the Allegro manual β€” you know, the game programming library? πŸ‘‘ And this one's about rest_callback, which is basically rest() with a lil glow-up. It's giving "nap time but make it productive" πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro.h>

void rest_callback(long time, void (*callback)())

πŸŽ€ DESCRIPTION πŸŽ€

So it's literally like rest(), no cap β€” except for non-zero values it continually calls the function you hand it, over and over, the whole time it's waiting for the required time to elapse. Like, it's sitting there waiting but it's also doing the thing the entire time. multitasking icon behavior fr fr πŸ’–

And if the callback parameter you pass is NULL? Then it does exactly the same thing as just calling rest(). No extra credit, no secret bonus features, just plain old rest. periodt. 🫢

lowkey important: the callback keeps getting called while the wait happens β€” that's the whole point, iykyk ✨

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole vibe, bestie πŸ’œ go forth and wait fabulously 🌈

mwah πŸ’‹ β€” this was Allegro, version 4.4.3, and yes the man page really is just called rest_callback(3alleg4). slay.