aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/OsHle/Kernel/NsTimeConverter.cs
blob: 84fb0b85ea86ca44d24b86e4c33da15d0a5ab546 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
namespace Ryujinx.Core.OsHle.Kernel
{
    static class NsTimeConverter
    {
        public static int GetTimeMs(ulong Ns)
        {
            ulong Ms = Ns / 1_000_000;

            if (Ms < int.MaxValue)
            {
                return (int)Ms;
            }
            else
            {
                return int.MaxValue;
            }
        }
    }
}