SSBM Decomp
Loading...
Searching...
No Matches
OSTime.c File Reference

Macros

#define OS_TIME_MONTH_MAX   12
 
#define OS_TIME_WEEK_DAY_MAX   7
 
#define OS_TIME_YEAR_DAY_MAX   365
 
#define BIAS    (2000 * 365 + (2000 + 3) / 4 - (2000 - 1) / 100 + (2000 - 1) / 400)
 

Functions

OSTime OSGetTime (void)
 
OSTick OSGetTick (void)
 
volatile OSTime OS_SYSTEM_TIME AT_ADDRESS (0x800030D8)
 
OSTime __OSGetSystemTime (void)
 
OSTime __OSTimeToSystemTime (s64 time)
 
static bool IsLeapYear (s32 year)
 
static s32 GetLeapDays (s32 year)
 
static void GetDates (s32 days, OSCalendarTime *cal)
 
void OSTicksToCalendarTime (OSTime ticks, OSCalendarTime *td)
 

Variables

static s32 YearDays [12]
 
static s32 LeapYearDays [12]
 

Macro Definition Documentation

◆ OS_TIME_MONTH_MAX

#define OS_TIME_MONTH_MAX   12

◆ OS_TIME_WEEK_DAY_MAX

#define OS_TIME_WEEK_DAY_MAX   7

◆ OS_TIME_YEAR_DAY_MAX

#define OS_TIME_YEAR_DAY_MAX   365

◆ BIAS

#define BIAS    (2000 * 365 + (2000 + 3) / 4 - (2000 - 1) / 100 + (2000 - 1) / 400)

Function Documentation

◆ OSGetTime()

OSTime OSGetTime ( void  )

◆ OSGetTick()

OSTick OSGetTick ( void  )

◆ AT_ADDRESS()

volatile OSTime OS_SYSTEM_TIME AT_ADDRESS ( 0x800030D8  )
extern

◆ __OSGetSystemTime()

OSTime __OSGetSystemTime ( void  )

◆ __OSTimeToSystemTime()

OSTime __OSTimeToSystemTime ( s64  time)

◆ IsLeapYear()

static bool IsLeapYear ( s32  year)
static

◆ GetLeapDays()

static s32 GetLeapDays ( s32  year)
static

◆ GetDates()

static void GetDates ( s32  days,
OSCalendarTime cal 
)
static

◆ OSTicksToCalendarTime()

void OSTicksToCalendarTime ( OSTime  ticks,
OSCalendarTime td 
)

Variable Documentation

◆ YearDays

s32 YearDays[12]
static
Initial value:
= { 0, 31, 59, 90, 120, 151,
181, 212, 243, 273, 304, 334 }

◆ LeapYearDays

s32 LeapYearDays[12]
static
Initial value:
= { 0, 31, 60, 91, 121, 152,
182, 213, 244, 274, 305, 335 }