more Lock

This commit is contained in:
Marco Carvalho
2024-12-03 12:00:40 -03:00
committed by Evan Husted
parent fb32540b6e
commit 938886824e
19 changed files with 34 additions and 33 deletions

View File

@@ -1,4 +1,5 @@
using Ryujinx.Common;
using System.Threading;
using System.Timers;
namespace Ryujinx.HLE
@@ -20,12 +21,12 @@ namespace Ryujinx.HLE
private readonly long[] _framesRendered;
private readonly double[] _percentTime;
private readonly object[] _frameLock;
private readonly object[] _percentLock;
private readonly Lock[] _frameLock = new[] { new Lock() };
private readonly Lock[] _percentLock = new[] { new Lock() };
private readonly double _ticksToSeconds;
private readonly Timer _resetTimer;
private readonly System.Timers.Timer _resetTimer;
public PerformanceStatistics()
{
@@ -41,10 +42,7 @@ namespace Ryujinx.HLE
_framesRendered = new long[1];
_percentTime = new double[1];
_frameLock = new[] { new object() };
_percentLock = new[] { new object() };
_resetTimer = new Timer(750);
_resetTimer = new(750);
_resetTimer.Elapsed += ResetTimerElapsed;
_resetTimer.AutoReset = true;