public class Timer extends Object
| Constructor and Description |
|---|
Timer() |
| Modifier and Type | Method and Description |
|---|---|
long |
endTimer()
Stop timing and return the elapsed time in milliseconds
|
long |
getTimeInterval()
Read an elapsed timer
|
long |
read()
Read the timer - either the instantanious value (if running) or elapsed time (if finished).
|
long |
readTimer()
Read a running timer
|
void |
startTimer() |
static long |
time(Runnable action)
Time an operation.
|
static String |
timeStr(long timeInterval)
Helper function to format milliseconds as "%.3f" seconds
|
public void startTimer()
public long endTimer()
public long read()
public long readTimer()
public long getTimeInterval()
public static String timeStr(long timeInterval)
public static long time(Runnable action)
Licenced under the Apache License, Version 2.0