mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-13 15:51:52 +01:00
25 lines
439 B
C
25 lines
439 B
C
|
#include "wut_newlib.h"
|
||
|
|
||
|
#include <coreinit/time.h>
|
||
|
|
||
|
int
|
||
|
__wut_gettod_r(struct _reent *ptr,
|
||
|
struct timeval *tp,
|
||
|
struct timezone *tz)
|
||
|
{
|
||
|
OSCalendarTime tm;
|
||
|
OSTicksToCalendarTime(OSGetTime(), &tm);
|
||
|
|
||
|
if (tp != NULL) {
|
||
|
tp->tv_sec = tm.tm_sec;
|
||
|
tp->tv_usec = tm.tm_usec + tm.tm_msec * 1000;
|
||
|
}
|
||
|
|
||
|
if (tz != NULL) {
|
||
|
tz->tz_minuteswest = 0;
|
||
|
tz->tz_dsttime = 0;
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|