Implement time:* 2.0.0 & 3.0.0 commands (#735)

* Finish ISteadyClock implementation

* Implement IsStandardNetworkSystemClockAccuracySufficient

Also use signed values for offsets and TimeSpanType

* Address comments

* Fix one missing nit and improve one comment
This commit is contained in:
Thomas Guillemard 2019-07-15 19:52:35 +02:00 committed by Ac_K
parent d8424a63c6
commit 1f3a34dd7a
8 changed files with 189 additions and 17 deletions

View file

@ -106,6 +106,15 @@ namespace Ryujinx.HLE.HOS.Services.Time
return StandardUserSystemClockCore.Instance.SetAutomaticCorrectionEnabled(context.Thread, autoCorrectionEnabled);
}
[Command(200)] // 3.0.0+
// IsStandardNetworkSystemClockAccuracySufficient() -> bool
public ResultCode IsStandardNetworkSystemClockAccuracySufficient(ServiceCtx context)
{
context.ResponseData.Write(StandardNetworkSystemClockCore.Instance.IsStandardNetworkSystemClockAccuracySufficient(context.Thread));
return ResultCode.Success;
}
[Command(300)] // 4.0.0+
// CalculateMonotonicSystemClockBaseTimePoint(nn::time::SystemClockContext) -> u64
public ResultCode CalculateMonotonicSystemClockBaseTimePoint(ServiceCtx context)