extimer(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– extimer(3) πŸ’–

okay so bestie, welcome to the Allegro manual β€” yes the whole thing, and yes we're doing this one together 🫢


✨ NAME ✨

extimer β€” literally all about using the timer, like the delays and the interrupts. it's part of the Allegro game programming library, no cap πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro.h>

Example extimer β€” that's the whole vibe, it's an example program, not some function you call, bestie πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this program is out here demonstrating how to use the timer routines, and ngl these things can be a bit of a pain 😭 because you have to be sure you lock all the memory that gets used inside your interrupt handlers. like, all of it. every last byte. if you don't, that's on you and it's giving undefined behaviour energy πŸ’€

the first part of the example shows a basic use of timing using the blocking function rest() β€” simple, chill, it just blocks, and that's the whole point ✨

the second part is where it gets iconic πŸ‘‘ it shows how to use three timers with different frequencies in a non blocking way. three of them. at once. main character energy fr fr 🌈


🌟 SEE ALSO 🌟

like, go read these too, iykyk πŸŽ€


πŸ’€ reminder bestie: lock every single variable and function your interrupt handlers touch. no exceptions. that's not me being dramatic, that's just the rules.

so that's the page πŸ’œ this was brought to you by Allegro, version 4.4.3 β€” that's the source and the version right there, mwah πŸŽ€ and it's extimer(3) in section 3, periodt. slay, go lock your memory, bye bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from