sdlxTimeToWindows function time

void sdlxTimeToWindows(
  1. int ticks,
  2. SdlxDateTimeWindows dateTime
)

Converts an SDL time into a Windows FILETIME (100-nanosecond intervals since January 1, 1601).

This function fills in the two 32-bit values of the FILETIME structure.

\param ticks the time to convert. \param dwLowDateTime a pointer filled in with the low portion of the Windows FILETIME value. \param dwHighDateTime a pointer filled in with the high portion of the Windows FILETIME value.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC void SDLCALL SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLowDateTime, Uint32 *dwHighDateTime)

Implementation

void sdlxTimeToWindows(int ticks, SdlxDateTimeWindows dateTime) {
  final dwLowDateTimePointer = ffi.calloc<Uint32>();
  final dwHighDateTimePointer = ffi.calloc<Uint32>();
  sdlTimeToWindows(ticks, dwLowDateTimePointer, dwHighDateTimePointer);
  dateTime
    ..dwLowDateTime = dwLowDateTimePointer.value
    ..dwHighDateTime = dwHighDateTimePointer.value;
  dwLowDateTimePointer.callocFree();
  dwHighDateTimePointer.callocFree();
}