37#define OS_BUS_CLOCK (__OSBusClock)
38#define OS_CORE_CLOCK (*(u32*)0x800000FC)
39#define OS_TIMER_CLOCK (OS_BUS_CLOCK / 4)
40#define OS_TIMER_CLOCK_MS (OS_TIMER_CLOCK / 1000)
42#define OSTicksToCycles(ticks) (((ticks) * ((OS_CORE_CLOCK * 2) / OS_TIMER_CLOCK)) / 2)
43#define OSTicksToSeconds(ticks) ((ticks) / OS_TIMER_CLOCK)
44#define OSTicksToMilliseconds(ticks) ((ticks) / (OS_TIMER_CLOCK / 1000))
45#define OSTicksToMicroseconds(ticks) (((ticks)*8) / (OS_TIMER_CLOCK / 125000))
46#define OSTicksToNanoseconds(ticks) (((ticks)*8000) / (OS_TIMER_CLOCK / 125000))
47#define OSSecondsToTicks(sec) ((sec)*OS_TIMER_CLOCK)
48#define OSMillisecondsToTicks(msec) ((msec) * (OS_TIMER_CLOCK / 1000))
49#define OSMicrosecondsToTicks(usec) (((usec) * (OS_TIMER_CLOCK / 125000)) / 8)
50#define OSNanosecondsToTicks(nsec) (((nsec) * (OS_TIMER_CLOCK / 125000)) / 8000)
OSTime time
Definition GXInit.c:61
OSTime OSGetTime(void)
Definition OSTime.c:9
OSTime OS_SYSTEM_TIME AT_ADDRESS(0x800030D8)
s64 OSTime
Definition OSTime.h:10
void GetDates(s32 days, OSCalendarTime *ct)
void OSTicksToCalendarTime(OSTime ticks, OSCalendarTime *ct)
Definition OSTime.c:120
u32 OSTick
Definition OSTime.h:11
OSTime __OSTimeToSystemTime(OSTime time)
Definition OSTime.c:50
OSTick OSGetTick(void)
Definition OSTime.c:25
OSTime __OSGetSystemTime(void)
Definition OSTime.c:37
T cLib_calcTimer(T *value)
Definition c_lib.h:74
s32 week_day
Definition OSTime.h:22
s32 year
Definition OSTime.h:21
s32 microseconds
Definition OSTime.h:25
s32 month
Definition OSTime.h:20
s32 minutes
Definition OSTime.h:17
s32 year_day
Definition OSTime.h:23
s32 hours
Definition OSTime.h:18
s32 day_of_month
Definition OSTime.h:19
s32 milliseconds
Definition OSTime.h:24
s32 seconds
Definition OSTime.h:16
unsigned long u32
Definition types.h:10
signed long long s64
Definition types.h:7
signed long s32
Definition types.h:6