mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-04-29 22:00:50 -07:00
* Add VTimer as alternative interrupt method on Apple Hypervisor * Fix naming violations on TimeApi * Fix timer interval (was 16us rather than 16ms) * Fix delta ticks calculation * Missing ThrowOnError call * Add SupportedOSPlatform attribute on AppleHv classes
22 lines
527 B
C#
22 lines
527 B
C#
using System.Runtime.InteropServices;
|
|
using System.Runtime.Versioning;
|
|
|
|
namespace Ryujinx.Cpu.AppleHv
|
|
{
|
|
struct MachTimebaseInfo
|
|
{
|
|
public uint Numer;
|
|
public uint Denom;
|
|
}
|
|
|
|
[SupportedOSPlatform("macos")]
|
|
static partial class TimeApi
|
|
{
|
|
[LibraryImport("libc", SetLastError = true)]
|
|
public static partial ulong mach_absolute_time();
|
|
|
|
[LibraryImport("libc", SetLastError = true)]
|
|
public static partial int mach_timebase_info(out MachTimebaseInfo info);
|
|
}
|
|
}
|