SSBM Decomp
Loading...
Searching...
No Matches
OSTime.h File Reference
#include <platform.h>

Go to the source code of this file.

Data Structures

struct  OSCalendarTime
 

Macros

#define OS_BUS_CLOCK   __OSBusClock
 
#define OS_TIMER_CLOCK   (OS_BUS_CLOCK / 4)
 
#define OSTicksToSeconds(ticks)   ((ticks) / (OS_TIMER_CLOCK))
 
#define OSTicksToMilliseconds(ticks)   ((ticks) / (OS_TIMER_CLOCK / 1000))
 
#define OSTicksToMicroseconds(ticks)    (((ticks) * 8) / (OS_TIMER_CLOCK / 125000))
 
#define OSSecondsToTicks(sec)   ((sec) * (OS_TIMER_CLOCK))
 
#define OSMillisecondsToTicks(msec)   ((msec) * (OS_TIMER_CLOCK / 1000))
 
#define OSMicrosecondsToTicks(usec)   (((usec) * (OS_TIMER_CLOCK / 125000)) / 8)
 
#define OSNanosecondsToTicks(nsec)    (((nsec) * (OS_TIMER_CLOCK / 125000)) / 8000)
 

Typedefs

typedef s64 OSTime
 
typedef u32 OSTick
 

Functions

void OSTicksToCalendarTime (OSTime ticks, OSCalendarTime *td)
 
OSTime OSGetTime (void)
 
OSTick OSGetTick (void)
 
OSTime __OSTimeToSystemTime (OSTime)
 
OSTime __OSGetSystemTime (void)
 
u32 __OSBusClock AT_ADDRESS (0x800000F8)
 

Macro Definition Documentation

◆ OS_BUS_CLOCK

#define OS_BUS_CLOCK   __OSBusClock

◆ OS_TIMER_CLOCK

#define OS_TIMER_CLOCK   (OS_BUS_CLOCK / 4)

◆ OSTicksToSeconds

#define OSTicksToSeconds (   ticks)    ((ticks) / (OS_TIMER_CLOCK))

◆ OSTicksToMilliseconds

#define OSTicksToMilliseconds (   ticks)    ((ticks) / (OS_TIMER_CLOCK / 1000))

◆ OSTicksToMicroseconds

#define OSTicksToMicroseconds (   ticks)     (((ticks) * 8) / (OS_TIMER_CLOCK / 125000))

◆ OSSecondsToTicks

#define OSSecondsToTicks (   sec)    ((sec) * (OS_TIMER_CLOCK))

◆ OSMillisecondsToTicks

#define OSMillisecondsToTicks (   msec)    ((msec) * (OS_TIMER_CLOCK / 1000))

◆ OSMicrosecondsToTicks

#define OSMicrosecondsToTicks (   usec)    (((usec) * (OS_TIMER_CLOCK / 125000)) / 8)

◆ OSNanosecondsToTicks

#define OSNanosecondsToTicks (   nsec)     (((nsec) * (OS_TIMER_CLOCK / 125000)) / 8000)

Typedef Documentation

◆ OSTime

typedef s64 OSTime

◆ OSTick

typedef u32 OSTick

Function Documentation

◆ OSTicksToCalendarTime()

void OSTicksToCalendarTime ( OSTime  ticks,
OSCalendarTime td 
)

◆ OSGetTime()

OSTime OSGetTime ( void  )

◆ OSGetTick()

OSTick OSGetTick ( void  )

◆ __OSTimeToSystemTime()

OSTime __OSTimeToSystemTime ( OSTime  time)

◆ __OSGetSystemTime()

OSTime __OSGetSystemTime ( void  )

◆ AT_ADDRESS()

u32 __OSBusClock AT_ADDRESS ( 0x800000F8  )
extern