public static class Timer0.Context extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getStartTime() |
void |
record(long elapsed)
Record the elapsed time to the timer.
|
long |
stop()
Stop the timer and record the elapsed time.
|
public void record(long elapsed)
elapsed - Elapsed time in nanoseconds.public long getStartTime()
public long stop()
IllegalStateException - if the timer is already stopped.public void close()
close in interface AutoCloseable