#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);
| ticks | An OSTime (64-bit) type integer value. |
|---|---|
| td | Pointer to an OSCalendarTime type, which obtains the calendar time. |
None.
Converts the time representation from ticks (in OS_TIMER_CLOCK Hz) to calendar time.
To get the current date and time, call the OSTicksToCalendarTime function as follows.
OSCalendarTime td; OSTicksToCalendarTime(OSGetTime(), &td);
Time Functions, OSTicksToCycles, OSTicksToSeconds, OSTicksToMilliseconds, OSSecondsToTicks, OSMillisecondsToTicks, OSMicrosecondsToTicks, OSNanosecondsToTicks, OSCalendarTimeToTicks
2006/03/01 Initial version.
CONFIDENTIAL