final class SlewClock
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
SlewClock.TimeProvider
Defines how the
SlewClock utility class will get to the wall clock |
Modifier and Type | Field and Description |
---|---|
private static java.util.concurrent.atomic.AtomicLong |
CURRENT |
private static long |
DRIFT_MAXIMAL |
private static org.slf4j.Logger |
LOG |
private static VicariousThreadLocal<java.lang.Long> |
OFFSET |
private static SlewClock.TimeProvider |
PROVIDER |
private static int |
SLEEP_BASE |
private static long |
SLEEP_MAXIMAL |
Modifier | Constructor and Description |
---|---|
private |
SlewClock() |
Modifier and Type | Method and Description |
---|---|
(package private) static long |
behind()
The method will check how much behind is the current thread compared to the wall clock since the last
timeMillis() call. |
private static long |
getCurrentTime() |
(package private) static boolean |
isThreadCatchingUp()
Verifies whether the current thread is currently catching up on time.
|
(package private) static void |
realignWithTimeProvider()
Deprecated.
|
private static long |
sleepTime(long current,
long previous) |
(package private) static long |
timeMillis()
Will return the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
|
private static final org.slf4j.Logger LOG
private static final SlewClock.TimeProvider PROVIDER
private static final long DRIFT_MAXIMAL
private static final long SLEEP_MAXIMAL
private static final int SLEEP_BASE
private static final java.util.concurrent.atomic.AtomicLong CURRENT
private static final VicariousThreadLocal<java.lang.Long> OFFSET
@Deprecated static void realignWithTimeProvider()
static long timeMillis()
static boolean isThreadCatchingUp()
timeMillis()
at least oncestatic long behind()
timeMillis()
call.
To be meaning full, this method has to be called after the thread has called timeMillis()
at least onceprivate static long sleepTime(long current, long previous)
private static long getCurrentTime()