Update of /cvsroot/jrobin/src/org/jrobin/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27847/org/jrobin/core
Modified Files:
Util.java
Log Message:
final tweaks
Index: Util.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/core/Util.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Util.java 26 Feb 2004 13:15:54 -0000 1.12
--- Util.java 22 Mar 2004 09:20:12 -0000 1.13
***************
*** 446,449 ****
--- 446,464 ----
}
}
+
+ private static Date lastLap = new Date();
+
+ /**
+ * Function used for debugging purposes and performance bottlenecks detection.
+ * Probably of no use for end users of JRobin.
+ * @return String representing time in seconds since last
+ * <code>getLapTime()</code> method call.
+ */
+ public static String getLapTime() {
+ Date newLap = new Date();
+ double seconds = (newLap.getTime() - lastLap.getTime()) / 1000.0;
+ lastLap = newLap;
+ return "[" + seconds + " sec]";
+ }
}
|