aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/OsHle/Kernel/NsTimeConverter.cs
blob: 966fdacae2b8b904a238be1280eda787394fbb7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
namespace Ryujinx.HLE.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;
            }
        }
    }
}