Function SDL_TimeToDateTime

pub unsafe extern "C" fn SDL_TimeToDateTime(
    ticks: i64,
    dt: *mut SDL_DateTime,
    localTime: bool,
) -> bool
Available on crate feature dep_sdl3 only.
Expand description

Converts an SDL_Time in nanoseconds since the epoch to a calendar time in the SDL_DateTime format.

§Parameters

  • ticks: the SDL_Time to be converted.
  • dt: the resulting SDL_DateTime.
  • localTime: the resulting SDL_DateTime will be expressed in local time if true, otherwise it will be in Universal Coordinated Time (UTC).

§Return value

Returns true on success or false on failure; call SDL_GetError() for more information.

§Availability

This function is available since SDL 3.2.0.