time topic

CategoryTime

SDL realtime clock and date/time routines.

There are two data types that are used in this category: SDL_Time, which represents the nanoseconds since a specific moment (an "epoch"), and SDL_DateTime, which breaks time down into human-understandable components: years, months, days, hours, etc.

Much of the functionality is involved in converting those two types to other useful forms.

Functions

sdlDateTimeToTime(Pointer<SdlDateTime> dt, Pointer<Int64> ticks) bool time
Converts a calendar time to an SDL_Time in nanoseconds since the epoch.
sdlGetCurrentTime(Pointer<Int64> ticks) bool time
Gets the current value of the system realtime clock in nanoseconds since Jan 1, 1970 in Universal Coordinated Time (UTC).
sdlGetDateTimeLocalePreferences(Pointer<Int32> dateFormat, Pointer<Int32> timeFormat) bool time
Gets the current preferred date and time format for the system locale.
sdlGetDayOfWeek(int year, int month, int day) int time
Get the day of week for a calendar date.
sdlGetDayOfYear(int year, int month, int day) int time
Get the day of year for a calendar date.
sdlGetDaysInMonth(int year, int month) int time
Get the number of days in a month for a given year.
sdlTimeFromWindows(int dwLowDateTime, int dwHighDateTime) int time
Converts a Windows FILETIME (100-nanosecond intervals since January 1, 1601) to an SDL time.
sdlTimeToDateTime(int ticks, Pointer<SdlDateTime> dt, bool localTime) bool time
Converts an SDL_Time in nanoseconds since the epoch to a calendar time in the SDL_DateTime format.
sdlTimeToWindows(int ticks, Pointer<Uint32> dwLowDateTime, Pointer<Uint32> dwHighDateTime) → void time
Converts an SDL time into a Windows FILETIME (100-nanosecond intervals since January 1, 1601).