time: Add timeGetStandardSteadyClockInternalOffset [3.0.0+]

This commit is contained in:
fincs 2020-04-11 00:08:46 +02:00
parent b4db31e536
commit b0d96342e8
No known key found for this signature in database
GPG Key ID: 62C7609ADA219C60
2 changed files with 14 additions and 0 deletions

View File

@ -96,6 +96,13 @@ void* timeGetSharedmemAddr(void);
*/
Result timeGetStandardSteadyClockTimePoint(TimeSteadyClockTimePoint *out);
/**
* @brief [3.0.0+] Gets the internal offset for the standard steady clock.
* @param[out] out Output internal offset.
* @return Result code.
*/
Result timeGetStandardSteadyClockInternalOffset(s64 *out);
/**
* @brief Gets the time for the specified clock.
* @param[in] type Clock to use.

View File

@ -170,6 +170,13 @@ Result timeGetStandardSteadyClockTimePoint(TimeSteadyClockTimePoint *out) {
return 0;
}
Result timeGetStandardSteadyClockInternalOffset(s64 *out) {
if (hosversionBefore(3,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return serviceDispatchOut(&g_timeSteadyClock, 200, *out);
}
Result timeGetCurrentTime(TimeType type, u64 *timestamp) {
Service *srv = timeGetServiceSession_SystemClock(type);