Skip to content

Commit

Permalink
Core: AddonReader: Reduce maximum sample size for timing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xian55 committed Jul 3, 2023
1 parent 71ae457 commit 509d35d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Core/Addon/AddonReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void Update()
FullReset();
return;
}
else if (updateIndex >= 512)
else if (updateIndex >= 8)
{
updateSum = 0;
updateIndex = 0;
Expand All @@ -81,7 +81,6 @@ public void Update()
updateSum += (DateTime.UtcNow - lastUpdate).TotalMilliseconds;
updateIndex++;
AvgUpdateLatency = updateSum / updateIndex;
lastUpdate = DateTime.UtcNow;

IAddonDataProvider reader = this.reader;

Expand Down Expand Up @@ -110,6 +109,8 @@ public void Update()
: string.Empty;
}

lastUpdate = DateTime.UtcNow;

resetEvent.Set();
}

Expand Down

0 comments on commit 509d35d

Please sign in to comment.