SDL_TimeToWindows(3)

πŸ’– SDL_TimeToWindows(3) πŸ’–

okay so bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_TimeToWindows πŸŽ€


✨ NAME ✨

SDL_TimeToWindows β€” no cap, this one converts an SDL time into a Windows FILETIME, and a FILETIME is measured in 100-nanosecond intervals since January 1, 1601. yes, 1601. the Windows girlies have been counting for a minute. β³πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_time.h>

void SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLowDateTime, Uint32 *dwHighDateTime);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this function fills in the two 32-bit values of the FILETIME structure. that's it, that's the whole vibe. you hand it a time, it hands you back the low half and the high half. it's giving split the number, deliver the goods ✨


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • ticks β€” the time to convert. just your regular time, minding its own business, waiting to be transmuted 🧚
  • dwLowDateTime β€” a pointer that gets filled in with the low portion of the Windows FILETIME value. lower half, holding it down πŸ’œ
  • dwHighDateTime β€” a pointer that gets filled in with the high portion of the Windows FILETIME value. upper half, doing the most πŸ“

πŸ”₯ THREAD SAFETY πŸ”₯

it is safe to call this function from any thread. every thread. all at once. no drama, no locking, no "wait your turn." the multitasking queen we deserve πŸ‘‘


⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. if you're on anything older, sorry bestie, it's not there yet 😭


πŸ’€ reminder: FILETIME is a Windows thing, so the whole point here is translating your nice portable SDL time into that 1601-era Windows counting system. the two 32-bit halves are the whole structure. no more, no less. periodt.

and that's the page!! thanks for coming to my ted talk, brought to you by Simple Directmedia Layer, version SDL 3.4.18, of the SDL_TimeToWindows(3) manual. mwah πŸ’‹ go convert some times bestie 🫢✨

πŸ“¦ where this page comes from