aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Cpu/AppleHv/TimeApi.cs
blob: 85bc77178841829f450ef18b64e7cfbfe1a4c389 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
    }
}