Package org.apache.cassandra.utils
Interface Clock
-
- All Known Implementing Classes:
Clock.Default
public interface ClockWrapper around time related functions that are either implemented by using the default JVM calls or by using a custom implementation for testing purposes. SeeClock.Global.instancefor how to use a custom implementation. Please note thatClockwasn't used, as it would not be possible to provide an implementation fornanoTime()with the exact same properties ofSystem.nanoTime().
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classClock.Defaultstatic classClock.Global
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description longcurrentTimeMillis()Semantically equivalent toSystem.currentTimeMillis()longnanoTime()Semantically equivalent toSystem.nanoTime()static voidwaitUntil(long deadlineNanos)
-
-
-
Method Detail
-
nanoTime
long nanoTime()
Semantically equivalent toSystem.nanoTime()
-
currentTimeMillis
long currentTimeMillis()
Semantically equivalent toSystem.currentTimeMillis()
-
waitUntil
static void waitUntil(long deadlineNanos) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
-