public abstract class Clock
extends java.lang.Object
Timer
to track timing.Modifier and Type | Class and Description |
---|---|
static class |
Clock.CpuTimeClock
A clock implementation which returns the current thread's CPU time.
|
static class |
Clock.UserTimeClock
A clock implementation which returns the current time in epoch nanoseconds.
|
Constructor and Description |
---|
Clock() |
Modifier and Type | Method and Description |
---|---|
static Clock |
defaultClock()
The default clock to use.
|
abstract long |
tick()
Returns the current time tick.
|
long |
time()
Returns the current time in milliseconds.
|