Merge pull request #3 from rw-r-r-0644/master

added OSTicksTOCalendarTime and OSCalendarTime struct
This commit is contained in:
Maschell 2016-09-19 20:26:28 +02:00 committed by GitHub
commit f32198ee43
3 changed files with 33 additions and 0 deletions

View File

@ -51,6 +51,8 @@ EXPORT_DECL(void, OSDetachThread, void * thread);
EXPORT_DECL(void, OSSleepTicks, u64 ticks);
EXPORT_DECL(u64, OSGetTick, void);
EXPORT_DECL(u64, OSGetTime, void);
EXPORT_DECL(void, OSTicksToCalendarTime, u64 time, OSCalendarTime * calendarTime);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! Mutex functions
@ -194,6 +196,8 @@ void InitOSFunctionPointers(void)
OS_FIND_EXPORT(coreinit_handle, OSSleepTicks);
OS_FIND_EXPORT(coreinit_handle, OSGetTick);
OS_FIND_EXPORT(coreinit_handle, OSGetTime);
OS_FIND_EXPORT(coreinit_handle, OSTicksToCalendarTime);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! Mutex functions
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@
#include <gctypes.h>
#include "common/os_defs.h"
#include "os_types.h"
#ifdef __cplusplus
extern "C" {
@ -93,6 +94,7 @@ extern void (* OSDetachThread)(void * thread);
extern void (* OSSleepTicks)(u64 ticks);
extern u64 (* OSGetTick)(void);
extern u64 (* OSGetTime)(void);
extern void (*OSTicksToCalendarTime)(u64 time, OSCalendarTime *calendarTime);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! Mutex functions

27
os_types.h Normal file
View File

@ -0,0 +1,27 @@
#ifndef _OS_TYPES_H_
#define _OS_TYPES_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <gctypes.h>
typedef struct _OSCalendarTime {
int sec;
int min;
int hour;
int mday;
int mon;
int year;
int wday;
int yday;
int msec;
int usec;
} OSCalendarTime;
#ifdef __cplusplus
}
#endif
#endif