al_set_timer_speed(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– al_set_timer_speed β€” Allegro 5 API πŸ’–

okay bestie, welcome to the Allegro reference manual, the al_set_timer_speed(3alleg5) page specifically, and honestly? it's giving short and iconic. let's go πŸŽ€


✨ NAME ✨

al_set_timer_speed β€” literally the Allegro 5 API function that changes how fast your timer ticks πŸ‘‘


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

void al_set_timer_speed(ALLEGRO_TIMER *timer, double new_speed_secs)

✨ DESCRIPTION ✨

so what this does is set the timer's speed, meaning the rate at which its counter gets incremented once it's been started. that's the whole vibe πŸ’…

and the good news? you can do this whether the timer is started or stopped. no waiting around, no drama.

but here's the tea πŸ«– β€” if the timer is currently running, the change is made to look as though the speed change happened precisely at the last tick. so it's not all glitchy and mid-tick, it's clean. slay.

also, speed_secs has exactly the same meaning as it does with al_create_timer(3alleg5). same energy, same rules, no cap ✨


✨ SEE ALSO ✨


and that's the whole page, bestie! this lil cutie came straight from the Allegro reference manual β€” al_set_timer_speed(3alleg5), that's the source and the page name right there. go forth and time things πŸ’–πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from