ALLEGRO_MSECS_TO_SECS(3alleg5)

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

✨ ALLEGRO_MSECS_TO_SECS ✨

okay bestie, welcome to the Allegro 5 API reference manual, section 3alleg5 πŸ’– this one's a lil baby page but it's lowkey iconic so let's go πŸ¦‹


🌸 NAME 🌸

ALLEGRO_MSECS_TO_SECS β€” the Allegro 5 API macro that does exactly what it says on the tin πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro.h>

#define ALLEGRO_MSECS_TO_SECS(x)      ((x) / 1000.0)

like. she's a one-liner. she's a #define. she ate and left no crumbs πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

bestie, this macro converts milliseconds to seconds. that's it. that's the whole vibe ✨

you hand her x in msecs, she hands you back the same amount of time measured in seconds, and she does it by dividing by 1000.0 β€” note the .0 because she is a floating point girlie and she is NOT about that integer division life πŸ™ˆ


no cap: the definition literally lives in the header, so it's the preprocessor doing the work, not some fancy runtime function. slay 🫢

Allegro reference manual πŸ’œ mwah, that's a wrap β€” go forth and convert your milliseconds, my gorgeous little time-lord 🧚✨

πŸ“¦ where this page comes from