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.
Classes
Functions
-
sdlDateTimeToTime(
Pointer< timeSdlDateTime> dt, Pointer<Int64> ticks) → bool - Converts a calendar time to an SDL_Time in nanoseconds since the epoch.
-
sdlGetCurrentTime(
Pointer< timeInt64> ticks) → bool - Gets the current value of the system realtime clock in nanoseconds since Jan 1, 1970 in Universal Coordinated Time (UTC).
-
sdlGetDateTimeLocalePreferences(
Pointer< timeInt32> dateFormat, Pointer<Int32> timeFormat) → bool - 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< timeSdlDateTime> dt, bool localTime) → bool - Converts an SDL_Time in nanoseconds since the epoch to a calendar time in the SDL_DateTime format.
-
sdlTimeToWindows(
int ticks, Pointer< timeUint32> dwLowDateTime, Pointer<Uint32> dwHighDateTime) → void - Converts an SDL time into a Windows FILETIME (100-nanosecond intervals since January 1, 1601).