# HG changeset patch # User alys # Date 2021-01-28 02:20:14 # Node ID f7905697af6a9bb845f29f21c7b75d927054a628 # Parent 1ae8283a0919ca9d42aa4206e835786d23c2d5f7 Add updateTime fully. 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); }