diff --git a/ps2/compat_files/time.c b/ps2/compat_files/time.c index 328fac7522..2a7e672892 100755 --- a/ps2/compat_files/time.c +++ b/ps2/compat_files/time.c @@ -70,24 +70,7 @@ static time_t _gmtotime_t ( return seconds_from_1970; } -/* Protected methods in libc */ -void _ps2sdk_time_init(void) -{ - SDL_Init(SDL_INIT_TIMER); -} - -/* Protected methods in libc */ -void _ps2sdk_time_deinit(void) -{ - SDL_QuitSubSystem(SDL_INIT_TIMER); -} - -clock_t clock(void) -{ - return SDL_GetTicks(); -} - -time_t time(time_t *t) { +time_t ps2_time(time_t *t) { time_t tim; sceCdCLOCK clocktime; /* defined in libcdvd.h */ @@ -106,3 +89,26 @@ time_t time(time_t *t) { return tim; } + +/* Protected methods in libc */ +void _ps2sdk_time_init(void) +{ + SDL_Init(SDL_INIT_TIMER); +} + +/* Protected methods in libc */ +void _ps2sdk_time_deinit(void) +{ + SDL_QuitSubSystem(SDL_INIT_TIMER); +} + +clock_t clock(void) +{ + return SDL_GetTicks(); +} + +time_t time(time_t *t) { + time_t tim = -1; + /* TODO: This function need to be implemented again because the SDK one is not working fine */ + return time; +}