From cb9046e776ca89b5ae041e74d6fb05d11989cbef Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Fri, 6 Oct 2023 23:03:16 +0200 Subject: [PATCH] Add system time update functions --- include/coreinit/time.h | 3 +++ include/nn/ccr/sys.h | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/coreinit/time.h b/include/coreinit/time.h index d5915974f..ffa363f68 100644 --- a/include/coreinit/time.h +++ b/include/coreinit/time.h @@ -84,6 +84,9 @@ void OSTicksToCalendarTime(OSTime time, OSCalendarTime *calendarTime); +BOOL +__OSSetAbsoluteSystemTime(OSTime time); + #ifdef __cplusplus } #endif diff --git a/include/nn/ccr/sys.h b/include/nn/ccr/sys.h index 621d01395..1297e9db2 100644 --- a/include/nn/ccr/sys.h +++ b/include/nn/ccr/sys.h @@ -1,5 +1,6 @@ #pragma once #include +#include /** * \defgroup nn_ccr_sys @@ -105,6 +106,18 @@ CCRSysGetPairingState(void); int32_t CCRSysGetPincode(uint32_t *pin); +/** + * Sets the DRH system time. + * + * \param time + * The system time in ticks. + * + * \return + * 0 on success. + */ +int32_t +CCRSysSetSystemTime(OSTime time); + #ifdef __cplusplus } #endif