diff --git a/os_functions.c b/os_functions.c index a87aa33..734e2e5 100644 --- a/os_functions.c +++ b/os_functions.c @@ -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 //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/os_functions.h b/os_functions.h index 29bad5f..347da67 100644 --- a/os_functions.h +++ b/os_functions.h @@ -26,6 +26,7 @@ #include #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 diff --git a/os_types.h b/os_types.h new file mode 100644 index 0000000..aaa18fe --- /dev/null +++ b/os_types.h @@ -0,0 +1,27 @@ +#ifndef _OS_TYPES_H_ +#define _OS_TYPES_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +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