Package io.debezium.util
Interface Clock
-
public interface ClockAn abstraction for a clock.- Author:
- Randall Hauch
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default InstantcurrentTime()default InstantcurrentTimeAsInstant()Get the current time as an instantdefault longcurrentTimeInMicros()Get the current time in microseconds.longcurrentTimeInMillis()Get the current time in milliseconds.default longcurrentTimeInNanos()Get the current time in nanoseconds.static Clocksystem()
-
-
-
Field Detail
-
SYSTEM
static final Clock SYSTEM
-
-
Method Detail
-
system
static Clock system()
- Returns:
- the system clock; never null
-
currentTime
default Instant currentTime()
-
currentTimeInNanos
default long currentTimeInNanos()
Get the current time in nanoseconds.- Returns:
- the current time in nanoseconds.
-
currentTimeInMicros
default long currentTimeInMicros()
Get the current time in microseconds.- Returns:
- the current time in microseconds.
-
currentTimeAsInstant
default Instant currentTimeAsInstant()
Get the current time as an instant- Returns:
- the current time as an instant.
-
currentTimeInMillis
long currentTimeInMillis()
Get the current time in milliseconds.- Returns:
- the current time in milliseconds.
-
-