Implement time:* 4.0.0 commands (#736)
* Abstract SteadyClockCore to follow Nintendo changes in 4.x This is the ground work for 4.0.0 support * Implement TickBasedSteadyClockCore Preparation for the ephemeral clock. * Refactor SystemClockCore to follow 4.0.0 changes * Implement EphemeralNetworkSystemClock * Implement GetSnapshotClock & GetSnapshotClockFromSystemClockContext * Implement CalculateStandardUserSystemClockDifferenceByUser & CalculateSpanBetween * Remove an outdated comment & unused import * Fix a nit and GetClockSnapshot * Address comment
This commit is contained in:
committed by
gdkchan
parent
d254548548
commit
54b79dffa8
@ -4,11 +4,35 @@ namespace Ryujinx.HLE.HOS.Services.Time.Clock
|
||||
{
|
||||
abstract class SystemClockCore
|
||||
{
|
||||
public abstract SteadyClockCore GetSteadyClockCore();
|
||||
private SteadyClockCore _steadyClockCore;
|
||||
private SystemClockContext _context;
|
||||
|
||||
public abstract ResultCode GetSystemClockContext(KThread thread, out SystemClockContext context);
|
||||
public SystemClockCore(SteadyClockCore steadyClockCore)
|
||||
{
|
||||
_steadyClockCore = steadyClockCore;
|
||||
_context = new SystemClockContext();
|
||||
|
||||
public abstract ResultCode SetSystemClockContext(SystemClockContext context);
|
||||
_context.SteadyTimePoint.ClockSourceId = steadyClockCore.GetClockSourceId();
|
||||
}
|
||||
|
||||
public virtual SteadyClockCore GetSteadyClockCore()
|
||||
{
|
||||
return _steadyClockCore;
|
||||
}
|
||||
|
||||
public virtual ResultCode GetSystemClockContext(KThread thread, out SystemClockContext context)
|
||||
{
|
||||
context = _context;
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
public virtual ResultCode SetSystemClockContext(SystemClockContext context)
|
||||
{
|
||||
_context = context;
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
public abstract ResultCode Flush(SystemClockContext context);
|
||||
|
||||
|
Reference in New Issue
Block a user