Interface Clock
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Clock
An abstraction for how time passes. It is passed toTimerto track timing.
-
-
Field Summary
Fields Modifier and Type Field Description static ClockDEFAULTA clock implementation which returns the current time in epoch nanoseconds.static ClockTHREAD_CPU_TIMEA clock implementation which returns the current thread's CPU time.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ClockdefaultClock()The default clock to use.longgetTick()Returns the current time tick.default longgetTime()Returns the current time in milliseconds.
-