diff --git a/isometric-park-fna/DebugWindow.cs b/isometric-park-fna/DebugWindow.cs --- a/isometric-park-fna/DebugWindow.cs +++ b/isometric-park-fna/DebugWindow.cs @@ -20,7 +20,7 @@ public Vector2 mouseGrid; public Boolean hasTree; public int tilesDrawn; - internal object updateTime; + public TimeSpan updateTime; } public class DebugWindow @@ -118,6 +118,7 @@ ImGui.Begin("Debug", ref show); ImGui.Text(string.Format("fps: {0:F3}", debugInfo.fps)); ImGui.Text(string.Format("Draw Time: {0:F3}", debugInfo.drawTime.TotalMilliseconds.ToString())); + ImGui.Text(string.Format("Update Time: {0:F3}", debugInfo.updateTime.TotalMilliseconds.ToString())); ImGui.Text(string.Format("Tiles Drawn: {0:F}", debugInfo.tilesDrawn)); diff --git a/isometric-park-fna/FNAGame.cs b/isometric-park-fna/FNAGame.cs --- a/isometric-park-fna/FNAGame.cs +++ b/isometric-park-fna/FNAGame.cs @@ -268,6 +268,9 @@ protected override void Update(GameTime gameTime) { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + float volume = 1.0f; float pitch = 0.0f; float pan = 0.0f; @@ -419,6 +422,9 @@ this.keyboardPrev = keyboardCur; + stopWatch.Stop(); + this.updateTime = stopWatch.Elapsed; + base.Update(gameTime); }