aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Kernel/NsTimeConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/NsTimeConverter.cs')
-rw-r--r--Ryujinx.HLE/HOS/Kernel/NsTimeConverter.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/NsTimeConverter.cs b/Ryujinx.HLE/HOS/Kernel/NsTimeConverter.cs
new file mode 100644
index 00000000..b8008f75
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Kernel/NsTimeConverter.cs
@@ -0,0 +1,19 @@
+namespace Ryujinx.HLE.HOS.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;
+ }
+ }
+ }
+} \ No newline at end of file