added sceRtcGetCurrentTick

This commit is contained in:
georgemoralis 2024-05-19 10:03:40 +03:00
parent c49c2f6c70
commit edc9543590
3 changed files with 11 additions and 4 deletions

View File

@ -101,7 +101,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
SUB(Lib, NpTrophy) \ SUB(Lib, NpTrophy) \
SUB(Lib, Screenshot) \ SUB(Lib, Screenshot) \
SUB(Lib, LibCInternal) \ SUB(Lib, LibCInternal) \
SUB(Lib, LibRtc) \ SUB(Lib, Rtc) \
CLS(Frontend) \ CLS(Frontend) \
CLS(Render) \ CLS(Render) \
SUB(Render, Vulkan) \ SUB(Render, Vulkan) \

View File

@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
// Generated By moduleGenerator // Generated By moduleGenerator
#include <chrono>
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/libraries/error_codes.h" #include "core/libraries/error_codes.h"
#include "core/libraries/libs.h" #include "core/libraries/libs.h"
@ -94,8 +95,10 @@ int PS4_SYSV_ABI sceRtcGetCurrentRawNetworkTick() {
return ORBIS_OK; return ORBIS_OK;
} }
int PS4_SYSV_ABI sceRtcGetCurrentTick() { int PS4_SYSV_ABI sceRtcGetCurrentTick(OrbisRtcTick* pTick) {
LOG_ERROR(Lib_Rtc, "(STUBBED) called"); pTick->tick = std::chrono::duration_cast<std::chrono::nanoseconds>(
std::chrono::high_resolution_clock::now().time_since_epoch())
.count();
return ORBIS_OK; return ORBIS_OK;
} }

View File

@ -11,6 +11,10 @@ class SymbolsResolver;
namespace Libraries::Rtc { namespace Libraries::Rtc {
struct OrbisRtcTick {
u64 tick;
};
int PS4_SYSV_ABI sceRtcCheckValid(); int PS4_SYSV_ABI sceRtcCheckValid();
int PS4_SYSV_ABI sceRtcCompareTick(); int PS4_SYSV_ABI sceRtcCompareTick();
int PS4_SYSV_ABI sceRtcConvertLocalTimeToUtc(); int PS4_SYSV_ABI sceRtcConvertLocalTimeToUtc();
@ -28,7 +32,7 @@ int PS4_SYSV_ABI sceRtcGetCurrentClockLocalTime();
int PS4_SYSV_ABI sceRtcGetCurrentDebugNetworkTick(); int PS4_SYSV_ABI sceRtcGetCurrentDebugNetworkTick();
int PS4_SYSV_ABI sceRtcGetCurrentNetworkTick(); int PS4_SYSV_ABI sceRtcGetCurrentNetworkTick();
int PS4_SYSV_ABI sceRtcGetCurrentRawNetworkTick(); int PS4_SYSV_ABI sceRtcGetCurrentRawNetworkTick();
int PS4_SYSV_ABI sceRtcGetCurrentTick(); int PS4_SYSV_ABI sceRtcGetCurrentTick(OrbisRtcTick* pTick);
int PS4_SYSV_ABI sceRtcGetDayOfWeek(); int PS4_SYSV_ABI sceRtcGetDayOfWeek();
int PS4_SYSV_ABI sceRtcGetDaysInMonth(); int PS4_SYSV_ABI sceRtcGetDaysInMonth();
int PS4_SYSV_ABI sceRtcGetDosTime(); int PS4_SYSV_ABI sceRtcGetDosTime();