|
SDL 3.0
|
#include <SDL3/SDL_error.h>#include <SDL3/SDL_stdinc.h>#include <SDL3/SDL_begin_code.h>#include <SDL3/SDL_close_code.h>
Include dependency graph for SDL_time.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | SDL_DateTime |
Macros | |
| #define | SDL_PROP_GLOBAL_SYSTEM_DATE_FORMAT_NUMBER "SDL.time.date_format" |
| #define | SDL_PROP_GLOBAL_SYSTEM_TIME_FORMAT_NUMBER "SDL.time.time_format" |
Enumerations | |
| enum | SDL_DateFormat { SDL_DATE_FORMAT_YYYYMMDD = 0 , SDL_DATE_FORMAT_DDMMYYYY = 1 , SDL_DATE_FORMAT_MMDDYYYY = 2 } |
| enum | SDL_TimeFormat { SDL_TIME_FORMAT_24HR = 0 , SDL_TIME_FORMAT_12HR = 1 } |
Functions | |
| int | SDL_GetCurrentTime (SDL_Time *ticks) |
| int | SDL_TimeToDateTime (SDL_Time ticks, SDL_DateTime *dt, SDL_bool localTime) |
| int | SDL_DateTimeToTime (const SDL_DateTime *dt, SDL_Time *ticks) |
| void | SDL_TimeToWindows (SDL_Time ticks, Uint32 *dwLowDateTime, Uint32 *dwHighDateTime) |
| SDL_Time | SDL_TimeFromWindows (Uint32 dwLowDateTime, Uint32 dwHighDateTime) |
| int | SDL_GetDaysInMonth (int year, int month) |
| int | SDL_GetDayOfYear (int year, int month, int day) |
| int | SDL_GetDayOfWeek (int year, int month, int day) |
Header for the SDL realtime clock and date/time routines.
Definition in file SDL_time.h.
| #define SDL_PROP_GLOBAL_SYSTEM_DATE_FORMAT_NUMBER "SDL.time.date_format" |
Definition at line 94 of file SDL_time.h.
| #define SDL_PROP_GLOBAL_SYSTEM_TIME_FORMAT_NUMBER "SDL.time.time_format" |
Definition at line 95 of file SDL_time.h.
| enum SDL_DateFormat |
The preferred date format of the current system locale.
| Enumerator | |
|---|---|
| SDL_DATE_FORMAT_YYYYMMDD | Year/Month/Day |
| SDL_DATE_FORMAT_DDMMYYYY | Day/Month/Year |
| SDL_DATE_FORMAT_MMDDYYYY | Month/Day/Year |
Definition at line 66 of file SDL_time.h.
| enum SDL_TimeFormat |
The preferred time format of the current system locale.
| Enumerator | |
|---|---|
| SDL_TIME_FORMAT_24HR | 24 hour time |
| SDL_TIME_FORMAT_12HR | 12 hour time |
Definition at line 80 of file SDL_time.h.
|
extern |
Converts a calendar time to an SDL_Time in nanoseconds since the epoch.
This function ignores the day_of_week member of the SDL_DateTime struct, so it may remain unset.
| dt | the source SDL_DateTime |
| ticks | the resulting SDL_Time |
|
extern |
Gets the current value of the system realtime clock in nanoseconds since Jan 1, 1970 in Universal Coordinated Time (UTC).
| ticks | the SDL_Time to hold the returned tick count |
|
extern |
Get the day of week for a calendar date.
| year | the year component of the date |
| month | the month component of the date |
| day | the day component of the date |
|
extern |
Get the day of year for a calendar date.
| year | the year component of the date |
| month | the month component of the date |
| day | the day component of the date |
|
extern |
Get the number of days in a month for a given year.
| year | the year |
| month | the month [1-12] |
Converts a Windows FILETIME (100-nanosecond intervals since January 1, 1601) to an SDL time.
This function takes the two 32-bit values of the FILETIME structure as parameters.
| dwLowDateTime | the low portion of the Windows FILETIME value |
| dwHighDateTime | the high portion of the Windows FILETIME value |
|
extern |
Converts an SDL_Time in nanoseconds since the epoch to a calendar time in the SDL_DateTime format.
| 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) |
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.
| ticks | the time to convert |
| dwLowDateTime | a pointer filled in with the low portion of the Windows FILETIME value |
| dwHighDateTime | a pointer filled in with the high portion of the Windows FILETIME value |