mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-09-12 19:27:54 -05:00
Add SHRN instruction, and fix ADDV
This commit is contained in:
@@ -12,16 +12,28 @@ namespace Ryujinx.OsHle.Objects.Time
|
||||
|
||||
private static DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
public ISystemClock()
|
||||
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.Standard ||
|
||||
ClockType == SystemClockType.Network)
|
||||
{
|
||||
CurrentTime = CurrentTime.ToUniversalTime();
|
||||
}
|
||||
|
||||
Context.ResponseData.Write((long)(DateTime.Now - Epoch).TotalSeconds);
|
||||
|
||||
return 0;
|
||||
|
9
Ryujinx/OsHle/Objects/Time/SystemClockType.cs
Normal file
9
Ryujinx/OsHle/Objects/Time/SystemClockType.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Ryujinx.OsHle.Objects.Time
|
||||
{
|
||||
enum SystemClockType
|
||||
{
|
||||
Standard,
|
||||
Network,
|
||||
Local
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user