From 5d6ad5da6129766d8cdada9dfda77cd0d2918ab5 Mon Sep 17 00:00:00 2001 From: Dmugetsu Date: Thu, 20 Mar 2025 01:20:44 -0600 Subject: [PATCH] Roamic suggestions --- src/core/libraries/kernel/time.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/core/libraries/kernel/time.cpp b/src/core/libraries/kernel/time.cpp index 23b64f560..b7e4c1756 100644 --- a/src/core/libraries/kernel/time.cpp +++ b/src/core/libraries/kernel/time.cpp @@ -121,7 +121,7 @@ static u64 FileTimeTo100Ns(FILETIME& ft) { return *reinterpret_cast(&ft); } -static s32 clock_gettime(u32 clock_id, struct OrbisKernelTimespec* ts) { +static s32 clock_gettime(u32 clock_id, struct timespec* ts) { switch (clock_id) { case CLOCK_REALTIME: case CLOCK_REALTIME_COARSE: { @@ -273,13 +273,10 @@ int PS4_SYSV_ABI orbis_clock_gettime(s32 clock_id, struct OrbisKernelTimespec* t } int PS4_SYSV_ABI sceKernelClockGettime(s32 clock_id, OrbisKernelTimespec* tp) { - struct OrbisKernelTimespec ts; - const auto res = orbis_clock_gettime(clock_id, &ts); + const auto res = orbis_clock_gettime(clock_id, tp); if (res < 0) { return ErrnoToSceKernelError(res); } - tp->tv_sec = ts.tv_sec; - tp->tv_nsec = ts.tv_nsec; return ORBIS_OK; } @@ -473,4 +470,4 @@ void RegisterTime(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("-o5uEDpN+oY", "libkernel", 1, "libkernel", 1, 1, sceKernelConvertUtcToLocaltime); } -} // namespace Libraries::Kernel +} // namespace Libraries::Kernel \ No newline at end of file