| java.lang.Object com.ibm.icu.dev.test.util.ElapsedTimer
ElapsedTimer | final public class ElapsedTimer (Code) | | Simple stopwatch timer.
Usage: { ElapsedTimer et = new ElapsedTimer();
do_some_stuff;
System.out.println("It took " + et + " to do stuff."); }
Advanced: { ElapsedTimer et = new ElapsedTimer("Thing2's time: {0}"); // messageformat pattern
do_thing_2();
System.out.println(et.toString()); }
More advanced: NumberFormat and/or MessageFormat can be provided in the constructor
|
ElapsedTimer | public ElapsedTimer()(Code) | | |
elapsedTime | public static String elapsedTime(long start, long end)(Code) | | Convenience method to print the elasped time (in milliseconds)
|
elapsedTime | public static String elapsedTime(long start)(Code) | | |
toString | final public String toString()(Code) | | elapsed time in seconds since object creation |
|
|