Changes

331 bytes added ,  17:34, 15 January 2017
m
Added OSCalendarTime struct and OSTicksToCalendarTime function
Line 303: Line 303:  
|<code>OSTime OSGetSystemTime(void)</code>
 
|<code>OSTime OSGetSystemTime(void)</code>
 
|Gets OSTime (which is just an int64_t) from tbu/tb (timebase upper/lower special purpose registers), same as get_timebase in kernel (FFF099E0 on 5.5.X)
 
|Gets OSTime (which is just an int64_t) from tbu/tb (timebase upper/lower special purpose registers), same as get_timebase in kernel (FFF099E0 on 5.5.X)
 +
|-
 +
|OSTicksToCalendarTime
 +
|<code>void OSTicksToCalendarTime(OSTime time, OSCalendarTime *calendartime)</code>
 +
|Converts OStime to an OSCalendarTime structure
 
|-
 
|-
 
|OSGetSystemInfo
 
|OSGetSystemInfo
Line 876: Line 880:  
<syntaxhighlight lang="C">
 
<syntaxhighlight lang="C">
 
#define OSTime int64_t /* stored in timebase upper/lower */
 
#define OSTime int64_t /* stored in timebase upper/lower */
 +
 +
typedef struct {
 +
    int sec;
 +
    int min;
 +
    int hour;
 +
    int mday;
 +
    int mon;
 +
    int year;
 +
    int wday;
 +
    int yday;
 +
    int msec;
 +
    int usec;
 +
} OSCalendarTime;
 
</syntaxhighlight>
 
</syntaxhighlight>
  
53

edits