public class Clock extends Object
Constructor and Description |
---|
Clock() |
Modifier and Type | Method and Description |
---|---|
long |
currentTimeMillis()
Get the current time of the clock in milliseconds.
|
long |
elapsedRealtime()
Returns milliseconds since boot, including time spent in sleep.
|
long |
elapsedRealtimeNanos()
Returns nanoseconds since boot, including time spent in sleep.
|
long |
nanoTime()
Returns the current timestamp of the most precise timer available on the local system, in
nanoseconds.
|
public long currentTimeMillis()
public long elapsedRealtime()
public long nanoTime()
public long elapsedRealtimeNanos()