aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Account
diff options
context:
space:
mode:
authorBerkan Diler <berkan.diler1@ingka.ikea.com>2022-12-24 18:30:39 +0100
committerGitHub <noreply@github.com>2022-12-24 14:30:39 -0300
commit37d27c4c99486312d9a282d7fc056c657efe0848 (patch)
tree51b77d6c112064039ed1eadb279251da6039cbc4 /Ryujinx.HLE/HOS/Services/Account
parentf906eb06c28880c20160cb4a969e3f6fddb3029b (diff)
Some minor cleanups and optimizations (#4174)
* Replace Array.Clear(x, 0, x.Length) with Array.Clear(x) * Use DateTime.UnixEpoch field * Replace SHA256.ComputeHash calls with static SHA256.HashData call More performant and avoids the need to initialize a SHA256 instance.
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Account')
-rw-r--r--Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs
index ef0a1a64..210b369c 100644
--- a/Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs
+++ b/Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs
@@ -4,8 +4,6 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
{
public class UserProfile
{
- private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
-
public UserId UserId { get; }
public long LastModifiedTimestamp { get; set; }
@@ -83,7 +81,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
private void UpdateLastModifiedTimestamp()
{
- LastModifiedTimestamp = (long)(DateTime.Now - Epoch).TotalSeconds;
+ LastModifiedTimestamp = (long)(DateTime.Now - DateTime.UnixEpoch).TotalSeconds;
}
}
} \ No newline at end of file