OSTicksToCalendarTime

C Specification

#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);

Arguments

ticks 64-bit OSTime type integer value.
td Pointer to the OSCalendarTime type that gets calendar time.

Return Values

None.

Description

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);

See Also

Time functions, OSTicksToCycles, OSTicksToSeconds, OSTicksToMilliseconds, OSSecondsToTicks, OSMillisecondsToTicks, OSMicrosecondsToTicks, OSNanosecondsToTicks, OSCalendarTimeToTicks

Revision History

03/01/2006 Initial version.