public class ElapsedTime
extends java.lang.Object
Does not measure deep sleep. Nanosecond accuracy.
Modifier and Type | Class and Description |
---|---|
static class |
ElapsedTime.Resolution |
Constructor and Description |
---|
ElapsedTime()
Constructor
|
ElapsedTime(ElapsedTime.Resolution resolution) |
ElapsedTime(long startTime)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
log(java.lang.String label)
Log a message stating how long the timer has been running
|
void |
reset()
Reset the start time to now
|
double |
startTime()
Get the relative start time
|
double |
time()
How many seconds since the start time.
|
java.lang.String |
toString()
Return a string stating the number of seconds that have passed
|
public ElapsedTime()
Starts the timer
public ElapsedTime(long startTime)
Starts timer with a pre-set time
startTime
- pre set timepublic ElapsedTime(ElapsedTime.Resolution resolution)
public void reset()
public double startTime()
public double time()
public void log(java.lang.String label)
public java.lang.String toString()
toString
in class java.lang.Object