al_create_timer(3)
π al_create_timer(3) π
okay bestie, this page is from the Library Functions Manual, and it's giving tiny time-baby energy. π°οΈβ¨
β¨ NAME β¨
al_create_timer β the Allegro 5 API call that makes a timer for you, no cap. π«Ά
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
ALLEGRO_TIMER *al_create_timer(double speed_secs)
π DESCRIPTION π
So this function allocates and initializes a timer. If it's successful, you get back a pointer to a new timer object; otherwise it returns NULL. π
speed_secs is in seconds per βtickβ, and it must be positive. No zero, no negative, bestie β positive only. π
The new timer is initially stopped, and it needs to be started with al_start_timer(3) before ALLEGRO_EVENT_TIMER(3) events are sent. Like, it's literally asleep until you wake it up. β°β¨
Usage note, iykyk: typical granularity is on the order of microseconds, but with some drivers it might only be milliseconds. So don't come for the timer if it's not pixel-perfect on every driver. π¦
π SEE ALSO π
Signed with sparkle: source/version tag is Allegro reference manual, page tag is al_create_timer(3), and there's no extra date listed on this one β fr fr. ππ
π¦ 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