sdlTimeToDateTime function time
Converts an SDL_Time in nanoseconds since the epoch to a calendar time in the SDL_DateTime format.
\param ticks the SDL_Time to be converted. \param dt the resulting SDL_DateTime. \param localTime the resulting SDL_DateTime will be expressed in local time if true, otherwise it will be in Universal Coordinated Time (UTC). \returns true on success or false on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.2.0.
extern SDL_DECLSPEC bool SDLCALL SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime *dt, bool localTime)
Implementation
bool sdlTimeToDateTime(int ticks, Pointer<SdlDateTime> dt, bool localTime) {
final sdlTimeToDateTimeLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(Int64 ticks, Pointer<SdlDateTime> dt, Uint8 localTime),
int Function(int ticks, Pointer<SdlDateTime> dt, int localTime)
>('SDL_TimeToDateTime');
return sdlTimeToDateTimeLookupFunction(ticks, dt, localTime ? 1 : 0) == 1;
}