mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-24 21:37:11 +02:00
Split main project into core,graphics and chocolarm4 subproject (#29)
This commit is contained in:
parent
cb665bb715
commit
62b827f474
257 changed files with 415 additions and 285 deletions
20
Ryujinx.Core/OsHle/Objects/Time/ISteadyClock.cs
Normal file
20
Ryujinx.Core/OsHle/Objects/Time/ISteadyClock.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
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>()
|
||||
{
|
||||
//...
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
42
Ryujinx.Core/OsHle/Objects/Time/ISystemClock.cs
Normal file
42
Ryujinx.Core/OsHle/Objects/Time/ISystemClock.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
20
Ryujinx.Core/OsHle/Objects/Time/ITimeZoneService.cs
Normal file
20
Ryujinx.Core/OsHle/Objects/Time/ITimeZoneService.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
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>()
|
||||
{
|
||||
//...
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
9
Ryujinx.Core/OsHle/Objects/Time/SystemClockType.cs
Normal file
9
Ryujinx.Core/OsHle/Objects/Time/SystemClockType.cs
Normal file
|
@ -0,0 +1,9 @@
|
|||
namespace Ryujinx.Core.OsHle.Objects.Time
|
||||
{
|
||||
enum SystemClockType
|
||||
{
|
||||
User,
|
||||
Network,
|
||||
Local
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue