#include <revolution/os.h>
typedef struct OSCalendarTime
{
int sec; // seconds after the minute [0, 61]
int min; // minutes after the hour [0, 59]
int hour; // hours since midnight [0, 23]
int mday; // day of the month [1, 31]
int mon; // month since January [0, 11]
int year; // year [1, ...]
int wday; // days since Sunday [0, 6]
int yday; // days since January 1 [0, 365]
int msec; // milliseconds after the second [0,999]
int usec; // microseconds after the millisecond [0,999]
} OSCalendarTime;
void OSTicksToCalendarTime (OSTime ticks, OSCalendarTime* td);
|
64-bit OSTime type integer value. |
|
Pointer to the OSCalendarTime type that gets calendar time. |
None.
Converts time from units of ticks (at OS_TIMER_CLOCK Hz) to calendar time.
To get the current date and time, call the OSTicksToCalendarTime function as shown below:
OSCalendarTime td; OSTicksToCalendarTime(OSGetTime(), &td);
Time functions, OSTicksToCycles, OSTicksToSeconds, OSTicksToMilliseconds, OSSecondsToTicks, OSMillisecondsToTicks, OSMicrosecondsToTicks, OSNanosecondsToTicks, OSCalendarTimeToTicks
03/01/2006 Initial version.