Sometimes it would have to wait a long time for lock to clear so moved it to a tryenter and skip if already locked
This commit is contained in:
parent
5f3a9eade8
commit
0fe8238d16
1 changed files with 3 additions and 2 deletions
|
@ -150,10 +150,11 @@ namespace Ryujinx.Profiler
|
||||||
{
|
{
|
||||||
_preserve = PerformanceCounter.ElapsedTicks;
|
_preserve = PerformanceCounter.ElapsedTicks;
|
||||||
|
|
||||||
// Make sure to clear queue
|
// Skip clearing queue if already clearing
|
||||||
lock (_timerQueueClearLock)
|
if (Monitor.TryEnter(_timerQueueClearLock))
|
||||||
{
|
{
|
||||||
ClearTimerQueue();
|
ClearTimerQueue();
|
||||||
|
Monitor.Exit(_timerQueueClearLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Timers;
|
return Timers;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue