Package org.apache.flink.util.clock
Class ManualClock
- java.lang.Object
-
- org.apache.flink.util.clock.Clock
-
- org.apache.flink.util.clock.ManualClock
-
-
Constructor Summary
Constructors Constructor Description ManualClock()ManualClock(long startTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longabsoluteTimeMillis()Gets the current absolute time, in milliseconds.voidadvanceTime(long duration, TimeUnit timeUnit)Advances the time by the given duration.voidadvanceTime(java.time.Duration duration)Advances the time by the given duration.longrelativeTimeMillis()Gets the current relative time, in milliseconds.longrelativeTimeNanos()Gets the current relative time, in nanoseconds.
-
-
-
Method Detail
-
absoluteTimeMillis
public long absoluteTimeMillis()
Description copied from class:ClockGets the current absolute time, in milliseconds.- Specified by:
absoluteTimeMillisin classClock
-
relativeTimeMillis
public long relativeTimeMillis()
Description copied from class:ClockGets the current relative time, in milliseconds.- Specified by:
relativeTimeMillisin classClock
-
relativeTimeNanos
public long relativeTimeNanos()
Description copied from class:ClockGets the current relative time, in nanoseconds.- Specified by:
relativeTimeNanosin classClock
-
advanceTime
public void advanceTime(long duration, TimeUnit timeUnit)Advances the time by the given duration. Time can also move backwards by supplying a negative value. This method performs no overflow check.
-
advanceTime
public void advanceTime(java.time.Duration duration)
Advances the time by the given duration. Time can also move backwards by supplying a negative value. This method performs no overflow check.
-
-