diff options
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Time/Clock/TickBasedSteadyClockCore.cs')
| -rw-r--r-- | src/Ryujinx.HLE/HOS/Services/Time/Clock/TickBasedSteadyClockCore.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Time/Clock/TickBasedSteadyClockCore.cs b/src/Ryujinx.HLE/HOS/Services/Time/Clock/TickBasedSteadyClockCore.cs new file mode 100644 index 00000000..fe74da7e --- /dev/null +++ b/src/Ryujinx.HLE/HOS/Services/Time/Clock/TickBasedSteadyClockCore.cs @@ -0,0 +1,24 @@ +using Ryujinx.Cpu; + +namespace Ryujinx.HLE.HOS.Services.Time.Clock +{ + class TickBasedSteadyClockCore : SteadyClockCore + { + public TickBasedSteadyClockCore() {} + + public override SteadyClockTimePoint GetTimePoint(ITickSource tickSource) + { + SteadyClockTimePoint result = new SteadyClockTimePoint + { + TimePoint = 0, + ClockSourceId = GetClockSourceId() + }; + + TimeSpanType ticksTimeSpan = TimeSpanType.FromTicks(tickSource.Counter, tickSource.Frequency); + + result.TimePoint = ticksTimeSpan.ToSeconds(); + + return result; + } + } +} |
