@FunctionalInterface public interface Clock
Timer
to track
timing.Modifier and Type | Field and Description |
---|---|
static Clock |
DEFAULT
A clock implementation which returns the current time in epoch
nanoseconds.
|
static Clock |
THREAD_CPU_TIME
A clock implementation which returns the current thread's CPU time.
|
Modifier and Type | Method and Description |
---|---|
static Clock |
defaultClock()
The default clock to use.
|
long |
getTick()
Returns the current time tick.
|
default long |
getTime()
Returns the current time in milliseconds.
|
static final Clock DEFAULT
static final Clock THREAD_CPU_TIME
Copyright © 2021. All rights reserved.