diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-02-25 01:34:16 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-02-25 01:34:27 -0300 |
| commit | fba0bf873257c4ac17f4584036661be08a1694d3 (patch) | |
| tree | d1677d09fd008b2dcfa7560e979460b277f76411 /Ryujinx.Core/OsHle/Objects/Time | |
| parent | a4ff0d34848416a68dff9f165bb90afae7a4fd20 (diff) | |
Refactor IPC services to have commands into separate classes, fix readme url
Diffstat (limited to 'Ryujinx.Core/OsHle/Objects/Time')
| -rw-r--r-- | Ryujinx.Core/OsHle/Objects/Time/ISteadyClock.cs | 20 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Objects/Time/ISystemClock.cs | 42 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Objects/Time/ITimeZoneService.cs | 20 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Objects/Time/SystemClockType.cs | 9 |
4 files changed, 0 insertions, 91 deletions
diff --git a/Ryujinx.Core/OsHle/Objects/Time/ISteadyClock.cs b/Ryujinx.Core/OsHle/Objects/Time/ISteadyClock.cs deleted file mode 100644 index 1116b849..00000000 --- a/Ryujinx.Core/OsHle/Objects/Time/ISteadyClock.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Ryujinx.Core.OsHle.Ipc; -using System.Collections.Generic; - -namespace Ryujinx.Core.OsHle.Objects.Time -{ - class ISteadyClock : IIpcInterface - { - private Dictionary<int, ServiceProcessRequest> m_Commands; - - public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; - - public ISteadyClock() - { - m_Commands = new Dictionary<int, ServiceProcessRequest>() - { - //... - }; - } - } -}
\ No newline at end of file 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<int, ServiceProcessRequest> m_Commands; - - public IReadOnlyDictionary<int, ServiceProcessRequest> 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<int, ServiceProcessRequest>() - { - { 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 diff --git a/Ryujinx.Core/OsHle/Objects/Time/ITimeZoneService.cs b/Ryujinx.Core/OsHle/Objects/Time/ITimeZoneService.cs deleted file mode 100644 index c083628b..00000000 --- a/Ryujinx.Core/OsHle/Objects/Time/ITimeZoneService.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Ryujinx.Core.OsHle.Ipc; -using System.Collections.Generic; - -namespace Ryujinx.Core.OsHle.Objects.Time -{ - class ITimeZoneService : IIpcInterface - { - private Dictionary<int, ServiceProcessRequest> m_Commands; - - public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; - - public ITimeZoneService() - { - m_Commands = new Dictionary<int, ServiceProcessRequest>() - { - //... - }; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Core/OsHle/Objects/Time/SystemClockType.cs b/Ryujinx.Core/OsHle/Objects/Time/SystemClockType.cs deleted file mode 100644 index f447ca1c..00000000 --- a/Ryujinx.Core/OsHle/Objects/Time/SystemClockType.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Ryujinx.Core.OsHle.Objects.Time -{ - enum SystemClockType - { - User, - Network, - Local - } -}
\ No newline at end of file |
