Permalink
Browse files

Changed disp():

  • Loading branch information...
fukaoi
fukaoi committed Oct 3, 2012
1 parent 300fd2b commit 529ee373b457e92fb0aff04385228e93b0edbf45
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/BenchMark.hx
View
@@ -50,7 +50,7 @@ class BenchMark {
**/
public function end():Void {
endTime = Date.now().getTime();
- var resultTime = endTime - startTime;
+ var resultTime:Float = endTime - startTime;
disp(resultTime / 1000);
}
@@ -91,9 +91,11 @@ class BenchMark {
private function disp(resultTime:Float) {
var funcName = pos.className + "." + pos.methodName;
var lineNumber = pos.lineNumber;
+ var zeroCheck = (resultTime == 0 ? "0.000" : Std.string(resultTime));
+ var digiCheck = StringTools.rpad(zeroCheck, "0", 5);
trace("[target name] $funcName".format());
trace("[line number] $lineNumber".format());
trace("[loop count] $loopCount".format());
- trace("[time] $resultTime/sec".format());
+ trace("[time] $digiCheck/sec".format());
}
}

0 comments on commit 529ee37

Please sign in to comment.