Bladeren bron

updated timer

Alexander Hendrich 11 jaren geleden
bovenliggende
commit
bb4880c0d4
2 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 3 0
      bbiwarg/Graphics/OutputWindow.cs
  2. 1 1
      bbiwarg/Utility/Timer.cs

+ 3 - 0
bbiwarg/Graphics/OutputWindow.cs

@@ -292,7 +292,10 @@ namespace bbiwarg.Graphics
             GL.TexCoord2(0.0, 1.0); GL.Vertex3(size_2 + gap, -size_2, -0.5);
             GL.End();
 
+            Timer.start("swapBuffers");
             SwapBuffers();
+            Timer.stop("swapBuffers");
+
             Timer.stop("outputTextures");
 
             Timer.stop("onRenderFrame");

+ 1 - 1
bbiwarg/Utility/Timer.cs

@@ -37,7 +37,7 @@ namespace bbiwarg.Utility
         }
 
         public static void output(String name) {
-            Console.WriteLine("name:" + name + "\t" + "mean:" + (sumTimes[name] / Math.Max(numTimes[name],1)) + "\t" + "min:" + minTimes[name] + "\t" + "max:" + maxTimes[name]);
+            Console.WriteLine("name:" + name + "\t" + "avg:" + (sumTimes[name] / Math.Max(numTimes[name],1)) + "\t" + "min:" + minTimes[name] + "\t" + "max:" + maxTimes[name]);
         }
 
         public static void outputAll() {