Package org.apache.hadoop.yarn.util
Class MonotonicClock
java.lang.Object
org.apache.hadoop.yarn.util.MonotonicClock
- All Implemented Interfaces:
Clock
A monotonic clock from some arbitrary time base in the past, counting in
milliseconds, and not affected by settimeofday or similar system clock
changes.
This is appropriate to use when computing how much longer to wait for an
interval to expire.
This function can return a negative value and it must be handled correctly
by callers. See the documentation of System#nanoTime for caveats.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetTime()Get current time from some arbitrary time base in the past, counting in milliseconds, and not affected by settimeofday or similar system clock changes.
-
Constructor Details
-
MonotonicClock
public MonotonicClock()
-
-
Method Details