Max 5 API Reference
The Systime API provides the means of getting the system time, instead of the scheduler time as you would with functions like gettime(). More...
|
Data Structures | |
| struct | t_datetime |
| The Systime data structure. More... | |
Enumerations | |
| enum | e_max_dateflags { SYSDATEFORMAT_FLAGS_SHORT = 1, SYSDATEFORMAT_FLAGS_MEDIUM = 2, SYSDATEFORMAT_FLAGS_LONG = 3 } |
Flags for the sysdateformat_formatdatetime() function. More... | |
Functions | |
| unsigned long | systime_ticks (void) |
| Find out the operating system’s time in ticks. | |
| unsigned long | systime_ms (void) |
| Find out the operating system’s time in milliseconds. | |
| void | systime_datetime (t_datetime *d) |
| Find out the operating system’s date and time. | |
| unsigned long | systime_seconds (void) |
| Find out the operating system’s time in seconds. | |
| void | systime_secondstodate (unsigned long secs, t_datetime *d) |
| Convert a time in seconds into a t_datetime representation. | |
| unsigned long | systime_datetoseconds (t_datetime *d) |
| Convert a t_datetime representation of time into seconds. | |
| void | sysdateformat_strftimetodatetime (char *strf, t_datetime *d) |
| Fill a t_datetime struct with a datetime formatted string. | |
| void | sysdateformat_formatdatetime (t_datetime *d, long dateflags, long timeflags, char *s, long buflen) |
| Get a human friendly string representation of a t_datetime. | |
The Systime API provides the means of getting the system time, instead of the scheduler time as you would with functions like gettime().
| enum e_max_dateflags |
Flags for the sysdateformat_formatdatetime() function.
| SYSDATEFORMAT_FLAGS_SHORT |
short |
| SYSDATEFORMAT_FLAGS_MEDIUM |
medium |
| SYSDATEFORMAT_FLAGS_LONG |
long |
Definition at line 34 of file ext_systime.h.
| void sysdateformat_formatdatetime | ( | t_datetime * | d, | |
| long | dateflags, | |||
| long | timeflags, | |||
| char * | s, | |||
| long | buflen | |||
| ) |
Get a human friendly string representation of a t_datetime.
For example: "Today", "Yesterday", etc.
| d | The address of a t_datetime to fill. | |
| dateflags | One of the values defined in e_max_dateflags. | |
| timeflags | Currently unused. Pass 0. | |
| s | An already allocated string to hold the human friendly result. | |
| buflen | The number of characters allocated to the string s. |
| void sysdateformat_strftimetodatetime | ( | char * | strf, | |
| t_datetime * | d | |||
| ) |
Fill a t_datetime struct with a datetime formatted string.
For example, the string "2007-12-24 12:21:00".
| strf | A string containing the datetime. | |
| d | The address of a t_datetime to fill. |
| void systime_datetime | ( | t_datetime * | d | ) |
Find out the operating system’s date and time.
| d | Returns the system’s date and time in a t_datetime data structure. |
| unsigned long systime_datetoseconds | ( | t_datetime * | d | ) |
Convert a t_datetime representation of time into seconds.
| d | The address of a t_datetime that contains a valid period of time. |
Referenced by db_util_stringtodate().
| unsigned long systime_ms | ( | void | ) |
Find out the operating system’s time in milliseconds.
| unsigned long systime_seconds | ( | void | ) |
Find out the operating system’s time in seconds.
| void systime_secondstodate | ( | unsigned long | secs, | |
| t_datetime * | d | |||
| ) |
Convert a time in seconds into a t_datetime representation.
| secs | A number of seconds to be represented as a t_datetime. | |
| d | The address of a t_datetime that will be filled with the converted value. |
Referenced by db_util_datetostring().
| unsigned long systime_ticks | ( | void | ) |
Find out the operating system’s time in ticks.
Referenced by jit_rand_setseed().