SDL_NS_PER_SECOND(3)

✨ SDL_NS_PER_SECOND ✨

okay bestie, welcome to SDL_NS_PER_SECOND(3) β€” it's one of those pages from the SDL3 FUNCTIONS crew, and it's literally a single number that runs the whole clock situation πŸ’–


🌸 NAME 🌸

SDL_NS_PER_SECOND β€” how many nanoseconds are chillin' in one single second. that's it. that's the whole job. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_timer.h>

#define SDL_NS_PER_SECOND   1000000000LL

like. it's a macro. it's already defined for you. you literally just say the name and it's there. no function call, no setup, no drama. πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

this value is always 1000000000.

not "usually". not "on most platforms". not "if you're lucky". it is always 1000000000, forever, no cap. so if you're out here doing math with nanoseconds and you need to divide or multiply by the second, this is your girl. use her. she's constant. she's consistent. she's giving main character energy and she never switches up on you. 😌✨


🌈 AVAILABILITY 🌈

this macro has been around since SDL 3.2.0, so if you're on anything older, bestie... it's not there. upgrade era fr fr. 🫢


ngl this is the shortest manpage you will ever read and honestly? iconic. no warnings, no bugs, no deprecated nonsense, no exit statuses, no environment variables. just a number. a really big number. and we love her for it. πŸ’€πŸ’–

mwah, that's the whole page, ty for coming to my ted talk 🌸 this little love letter came to you from Simple Directmedia Layer, sitting pretty at SDL 3.4.18, and it lives under the name SDL_NS_PER_SECOND(3) β€” see you in the next one, bestie, stay constant πŸ’œβœ¨

πŸ“¦ where this page comes from