Package io.debezium.util
Interface Clock
-
public interface Clock
An 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 Instant
currentTime()
default Instant
currentTimeAsInstant()
Get the current time as an instantdefault long
currentTimeInMicros()
Get the current time in microseconds.long
currentTimeInMillis()
Get the current time in milliseconds.default long
currentTimeInNanos()
Get the current time in nanoseconds.static Clock
system()
-
-
-
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.
-
-