aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Time/Clock
diff options
context:
space:
mode:
authorThog <me@thog.eu>2020-05-15 03:30:08 +0200
committerGitHub <noreply@github.com>2020-05-15 03:30:08 +0200
commit378259a40a938cad6a53b7d2910bb1d2d0fdb58a (patch)
tree7da3a498614418d2548c2df6e2b3b70332024753 /Ryujinx.HLE/HOS/Services/Time/Clock
parentb2e58559283e184bc85bbb473511a7c8349c0fe5 (diff)
Surface Flinger: Implement GetBufferHistory (#1232)
* Surface Flinger: Implement GetBufferHistory Also fix some bugs on the Surface Flinger implementation * Address Ac_K's comment
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Time/Clock')
-rw-r--r--Ryujinx.HLE/HOS/Services/Time/Clock/Types/TimeSpanType.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Time/Clock/Types/TimeSpanType.cs b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/TimeSpanType.cs
index 89497d82..94c1b488 100644
--- a/Ryujinx.HLE/HOS/Services/Time/Clock/Types/TimeSpanType.cs
+++ b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/TimeSpanType.cs
@@ -39,6 +39,11 @@ namespace Ryujinx.HLE.HOS.Services.Time.Clock
return new TimeSpanType(seconds * NanoSecondsPerSecond);
}
+ public static TimeSpanType FromTimeSpan(TimeSpan timeSpan)
+ {
+ return new TimeSpanType((long)(timeSpan.TotalMilliseconds * 1000000));
+ }
+
public static TimeSpanType FromTicks(ulong ticks, ulong frequency)
{
return FromSeconds((long)ticks / (long)frequency);