Description:
Add updateTime fully.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -20,7 +20,7 | |||
|
20 | 20 | public Vector2 mouseGrid; |
|
21 | 21 | public Boolean hasTree; |
|
22 | 22 | public int tilesDrawn; |
|
23 |
|
|
|
23 | public TimeSpan updateTime; | |
|
24 | 24 | } |
|
25 | 25 | |
|
26 | 26 | public class DebugWindow |
@@ -118,6 +118,7 | |||
|
118 | 118 | ImGui.Begin("Debug", ref show); |
|
119 | 119 | ImGui.Text(string.Format("fps: {0:F3}", debugInfo.fps)); |
|
120 | 120 | ImGui.Text(string.Format("Draw Time: {0:F3}", debugInfo.drawTime.TotalMilliseconds.ToString())); |
|
121 | ImGui.Text(string.Format("Update Time: {0:F3}", debugInfo.updateTime.TotalMilliseconds.ToString())); | |
|
121 | 122 | ImGui.Text(string.Format("Tiles Drawn: {0:F}", debugInfo.tilesDrawn)); |
|
122 | 123 | |
|
123 | 124 |
@@ -268,6 +268,9 | |||
|
268 | 268 | protected override void Update(GameTime gameTime) |
|
269 | 269 | { |
|
270 | 270 | |
|
271 | Stopwatch stopWatch = new Stopwatch(); | |
|
272 | stopWatch.Start(); | |
|
273 | ||
|
271 | 274 | float volume = 1.0f; |
|
272 | 275 | float pitch = 0.0f; |
|
273 | 276 | float pan = 0.0f; |
@@ -419,6 +422,9 | |||
|
419 | 422 | |
|
420 | 423 | this.keyboardPrev = keyboardCur; |
|
421 | 424 | |
|
425 | stopWatch.Stop(); | |
|
426 | this.updateTime = stopWatch.Elapsed; | |
|
427 | ||
|
422 | 428 | base.Update(gameTime); |
|
423 | 429 | |
|
424 | 430 | } |
You need to be logged in to leave comments.
Login now