added PerformanceCounter

This commit is contained in:
Evil Factory
2022-06-19 11:50:51 -03:00
parent 78716f4695
commit 64c81146fb
5 changed files with 61 additions and 16 deletions
@@ -350,7 +350,10 @@ namespace Barotrauma
GameMain.LuaCs.Update();
GameMain.LuaCs.Hook.Call("think", new object[] { });
performanceCounterTimer.Stop();
LuaCsTimer.LastUpdateTime = performanceCounterTimer.ElapsedMilliseconds;
if (GameMain.LuaCs.PerformanceCounter.EnablePerformanceCounter)
{
GameMain.LuaCs.PerformanceCounter.UpdateElapsedTime = (double)performanceCounterTimer.ElapsedTicks / Stopwatch.Frequency;
}
performanceCounterTimer.Reset();
Timing.Accumulator -= Timing.Step;