Method Summary |
|
public long | elapsed() Returns total elapsed time from the
JStopWatch.start() in ms. |
public static String | formatTimeSpan(long millis) Formats time spans. |
public long[] | getLapTimes(int index) Returns lap times for 1-based lap index. |
public String | getName() Returns stopwatch name. |
public boolean | isRunning() Returns true if stopwatch is running. |
public long | lap() Marks a lap and returns its length. |
protected long | lap(long lap) |
public long | restart() Restarts the stopwatch. |
public long | span() Stops the stopwatch and returns total time span for last
start-stop sequence. |
public long | start() Starts the stopwatch. |
public long | stop() Stops the stopwatch if running. |
public String | toString() Returns total elapsed time as formated string from the last start. |
public long | total() Stops the stopwatch and returns total cumulative time in ms. |
public int | totalLaps() Returns the total number of laps up to this moment. |