wut  v1.5.0
Wii U Toolchain
Data Structures | Macros | Typedefs | Functions
Collaboration diagram for Time:

Data Structures

struct  OSCalendarTime
 Same as std c struct tm but with msec and usec added. More...
 

Macros

#define OSTimerClockSpeed   ((OSGetSystemInfo()->busClockSpeed) / 4)
 
#define OSSecondsToTicks(val)   ((uint64_t)(val) * (uint64_t)OSTimerClockSpeed)
 
#define OSMillisecondsToTicks(val)   (((uint64_t)(val) * (uint64_t)OSTimerClockSpeed) / 1000ull)
 
#define OSMicrosecondsToTicks(val)   (((uint64_t)(val) * (uint64_t)OSTimerClockSpeed) / 1000000ull)
 
#define OSNanosecondsToTicks(val)   (((uint64_t)(val) * ((uint64_t)OSTimerClockSpeed) / 31250ull) / 32000ull)
 
#define OSTicksToSeconds(val)   ((uint64_t)(val) / (uint64_t)OSTimerClockSpeed)
 
#define OSTicksToMilliseconds(val)   (((uint64_t)(val) * 1000ull) / (uint64_t)OSTimerClockSpeed)
 
#define OSTicksToMicroseconds(val)   (((uint64_t)(val) * 1000000ull) / (uint64_t)OSTimerClockSpeed)
 
#define OSTicksToNanoseconds(val)   (((uint64_t)(val) * 32000ull) / ((uint64_t)OSTimerClockSpeed / 31250ull))
 

Typedefs

typedef struct OSCalendarTime OSCalendarTime
 
typedef int32_t OSTick
 
typedef int64_t OSTime
 

Functions

OSTime OSGetTime ()
 
OSTime OSGetSystemTime ()
 
OSTick OSGetTick ()
 
OSTick OSGetSystemTick ()
 
OSTime OSCalendarTimeToTicks (OSCalendarTime *calendarTime)
 
void OSTicksToCalendarTime (OSTime time, OSCalendarTime *calendarTime)
 
BOOL __OSSetAbsoluteSystemTime (OSTime time)
 

Detailed Description


Data Structure Documentation

◆ OSCalendarTime

struct OSCalendarTime

Same as std c struct tm but with msec and usec added.

Definition at line 21 of file time.h.

Data Fields
int32_t tm_sec Seconds after the minute. The range is 0-59.
int32_t tm_min Minutes after the hour. The range is 0-59.
int32_t tm_hour Hours since midnight. The range is 0-23.
int32_t tm_mday Day of the month. The range is 1-31.
int32_t tm_mon Month since January. The range is 0-11.
int32_t tm_year Years in AD. The range is 1-....
int32_t tm_wday Days since Sunday. The range is 0-6.
int32_t tm_yday Days since January 1. The range is 0-365.
int32_t tm_msec Milliseconds after the second. The range is 0-999.
int32_t tm_usec Microseconds after the millisecond. The range is 0-999.

Macro Definition Documentation

◆ OSTimerClockSpeed

#define OSTimerClockSpeed   ((OSGetSystemInfo()->busClockSpeed) / 4)

Definition at line 56 of file time.h.

◆ OSSecondsToTicks

#define OSSecondsToTicks (   val)    ((uint64_t)(val) * (uint64_t)OSTimerClockSpeed)

Definition at line 58 of file time.h.

◆ OSMillisecondsToTicks

#define OSMillisecondsToTicks (   val)    (((uint64_t)(val) * (uint64_t)OSTimerClockSpeed) / 1000ull)

Definition at line 59 of file time.h.

◆ OSMicrosecondsToTicks

#define OSMicrosecondsToTicks (   val)    (((uint64_t)(val) * (uint64_t)OSTimerClockSpeed) / 1000000ull)

Definition at line 60 of file time.h.

◆ OSNanosecondsToTicks

#define OSNanosecondsToTicks (   val)    (((uint64_t)(val) * ((uint64_t)OSTimerClockSpeed) / 31250ull) / 32000ull)

Definition at line 61 of file time.h.

◆ OSTicksToSeconds

#define OSTicksToSeconds (   val)    ((uint64_t)(val) / (uint64_t)OSTimerClockSpeed)

Definition at line 63 of file time.h.

◆ OSTicksToMilliseconds

#define OSTicksToMilliseconds (   val)    (((uint64_t)(val) * 1000ull) / (uint64_t)OSTimerClockSpeed)

Definition at line 64 of file time.h.

◆ OSTicksToMicroseconds

#define OSTicksToMicroseconds (   val)    (((uint64_t)(val) * 1000000ull) / (uint64_t)OSTimerClockSpeed)

Definition at line 65 of file time.h.

◆ OSTicksToNanoseconds

#define OSTicksToNanoseconds (   val)    (((uint64_t)(val) * 32000ull) / ((uint64_t)OSTimerClockSpeed / 31250ull))

Definition at line 66 of file time.h.

Typedef Documentation

◆ OSCalendarTime

Definition at line 1 of file time.h.

◆ OSTick

typedef int32_t OSTick

Definition at line 17 of file time.h.

◆ OSTime

typedef int64_t OSTime

Definition at line 18 of file time.h.

Function Documentation

◆ OSGetTime()

OSTime OSGetTime ( )

◆ OSGetSystemTime()

OSTime OSGetSystemTime ( )

◆ OSGetTick()

OSTick OSGetTick ( )

◆ OSGetSystemTick()

OSTick OSGetSystemTick ( )

◆ OSCalendarTimeToTicks()

OSTime OSCalendarTimeToTicks ( OSCalendarTime calendarTime)

◆ OSTicksToCalendarTime()

void OSTicksToCalendarTime ( OSTime  time,
OSCalendarTime calendarTime 
)

◆ __OSSetAbsoluteSystemTime()

BOOL __OSSetAbsoluteSystemTime ( OSTime  time)