From fba0bf873257c4ac17f4584036661be08a1694d3 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 25 Feb 2018 01:34:16 -0300 Subject: Refactor IPC services to have commands into separate classes, fix readme url --- Ryujinx.Core/OsHle/Objects/Time/ISystemClock.cs | 42 ------------------------- 1 file changed, 42 deletions(-) delete mode 100644 Ryujinx.Core/OsHle/Objects/Time/ISystemClock.cs (limited to 'Ryujinx.Core/OsHle/Objects/Time/ISystemClock.cs') diff --git a/Ryujinx.Core/OsHle/Objects/Time/ISystemClock.cs b/Ryujinx.Core/OsHle/Objects/Time/ISystemClock.cs deleted file mode 100644 index 3aa70691..00000000 --- a/Ryujinx.Core/OsHle/Objects/Time/ISystemClock.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Ryujinx.Core.OsHle.Ipc; -using System; -using System.Collections.Generic; - -namespace Ryujinx.Core.OsHle.Objects.Time -{ - class ISystemClock : IIpcInterface - { - private Dictionary m_Commands; - - public IReadOnlyDictionary Commands => m_Commands; - - private static DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); - - private SystemClockType ClockType; - - public ISystemClock(SystemClockType ClockType) - { - m_Commands = new Dictionary() - { - { 0, GetCurrentTime } - }; - - this.ClockType = ClockType; - } - - public long GetCurrentTime(ServiceCtx Context) - { - DateTime CurrentTime = DateTime.Now; - - if (ClockType == SystemClockType.User || - ClockType == SystemClockType.Network) - { - CurrentTime = CurrentTime.ToUniversalTime(); - } - - Context.ResponseData.Write((long)(DateTime.Now - Epoch).TotalSeconds); - - return 0; - } - } -} \ No newline at end of file -- cgit v1.2.3