Package io.github.resilience4j.core
Interface Clock
public interface Clock
A clock abstraction used to measure absolute and relative time.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongCurrent monotonic time in nanoseconds.longwallTime()Current time expressed as milliseconds since the Unix epoch.
-
Field Details
-
SYSTEM
-
-
Method Details
-
wallTime
long wallTime()Current time expressed as milliseconds since the Unix epoch. Should not be used for measuring time, just for timestamps.- Returns:
- wall time in milliseconds
-
monotonicTime
long monotonicTime()Current monotonic time in nanoseconds. Should be used for measuring time. The value is not related to the wall time and is not subject to system clock changes.- Returns:
- monotonic time in nanoseconds
-