summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Events
diff options
context:
space:
mode:
authorDrachenkaetzchen <felicia@drachenkatze.org>2020-01-10 14:08:25 +0100
committerDrachenkaetzchen <felicia@drachenkatze.org>2020-01-10 14:08:25 +0100
commit47f626cc99c93a28b2d6867ed6cc717b39ec062c (patch)
tree475d30d1d7a269c3f27a5c7d2bdca29dbc7e0bde /src/SMAPI/Framework/Events
parenta751252c4ee3b48977d5d24c36a4e4e5466f93db (diff)
downloadSMAPI-47f626cc99c93a28b2d6867ed6cc717b39ec062c.tar.gz
SMAPI-47f626cc99c93a28b2d6867ed6cc717b39ec062c.tar.bz2
SMAPI-47f626cc99c93a28b2d6867ed6cc717b39ec062c.zip
Moved most PerformanceCounter logic out of SCore into the new PerformanceCounterManager, some namespace refactoring
Diffstat (limited to 'src/SMAPI/Framework/Events')
-rw-r--r--src/SMAPI/Framework/Events/ManagedEvent.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/Events/ManagedEvent.cs b/src/SMAPI/Framework/Events/ManagedEvent.cs
index 9a5cb174..bb915738 100644
--- a/src/SMAPI/Framework/Events/ManagedEvent.cs
+++ b/src/SMAPI/Framework/Events/ManagedEvent.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using StardewModdingAPI.Framework.Utilities;
-using PerformanceCounter = StardewModdingAPI.Framework.Utilities.PerformanceCounter;
+using PerformanceCounter = StardewModdingAPI.Framework.PerformanceCounter.PerformanceCounter;
namespace StardewModdingAPI.Framework.Events
{
@@ -32,7 +32,7 @@ namespace StardewModdingAPI.Framework.Events
/// <summary>The cached invocation list.</summary>
private EventHandler<TEventArgs>[] CachedInvocationList;
- public IDictionary<string, PerformanceCounter> PerformanceCounters { get; } = new Dictionary<string, PerformanceCounter>();
+ public IDictionary<string, PerformanceCounter.PerformanceCounter> PerformanceCounters { get; } = new Dictionary<string, PerformanceCounter.PerformanceCounter>();
private readonly Stopwatch Stopwatch = new Stopwatch();
@@ -47,7 +47,7 @@ namespace StardewModdingAPI.Framework.Events
public double GetGameAverageExecutionTime()
{
- if (this.PerformanceCounters.TryGetValue(Constants.GamePerformanceCounterName, out PerformanceCounter gameExecTime))
+ if (this.PerformanceCounters.TryGetValue(Constants.GamePerformanceCounterName, out PerformanceCounter.PerformanceCounter gameExecTime))
{
return gameExecTime.GetAverage();
}
@@ -151,7 +151,7 @@ namespace StardewModdingAPI.Framework.Events
if (!this.PerformanceCounters.ContainsKey(modName))
{
- this.PerformanceCounters.Add(modName, new PerformanceCounter($"{modName}.{this.EventName}"));
+ this.PerformanceCounters.Add(modName, new PerformanceCounter.PerformanceCounter($"{modName}.{this.EventName}"));
}
this.PerformanceCounters[modName].Add(performanceCounterEntry);