SDL_Time(3type)
π NAME π
okay bestie, gather round, because SDL_Time is literally the moment. it's from the SDL3 DATATYPES lineup, and here's the whole vibe: an SDL_Time is a signed, 64-bit integer that counts nanoseconds since the Unix epoch β and the Unix epoch is Jan 1, 1970, iykyk. that's it. that's the girl. π°οΈβ¨
β¨ SYNOPSIS β¨
#include <SDL3/SDL_stdinc.h>
typedef Sint64 SDL_Time;
#define SDL_MAX_TIME SDL_MAX_SINT64
#define SDL_MIN_TIME SDL_MIN_SINT64
like, look at her. typedef Sint64 SDL_Time; β an icon, a legend, a 64-bit signed situation. and she brought friends: SDL_MAX_TIME is literally just SDL_MAX_SINT64, and SDL_MIN_TIME is SDL_MIN_SINT64. no cap, those are the exact definitions, don't let anyone tell you otherwise π
πΈ DESCRIPTION πΈ
so here's the tea, bestie. SDL_Time does not live in her own little bubble β she's a social butterfly and she converts. π¦
- wanna go between
SDL_Timeand POSIXtime_tvalues? useSDL_NS_TO_SECONDS()andSDL_SECONDS_TO_NS(). one goes one way, one goes the other, and they ate. π₯ - wanna go between
SDL_Timeand WindowsFILETIMEvalues? that'sSDL_TimeToWindows()andSDL_TimeFromWindows(), and yes they're giving exactly what you think they're giving. β¨
that's the entire description, and honestly? obsessed. short, sweet, main character energy. π
π AVAILABILITY π
this datatype said "let me make an entrance" and arrived in SDL 3.2.0. so if you're on anything older, bestie... it's not there. π
π SEE ALSO π
SDL_MAX_SINT64(3)β the big number energy πSDL_MIN_SINT64(3)β the tiny number energy π
and that's the whole page, bestie!! slay π«Ά this was brought to you by Simple Directmedia Layer, SDL 3.4.18, and this very SDL_Time(3type) moment β go forth and count your nanoseconds, you gorgeous genius, periodt ππβ¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms