public class UniqueMicroTimeProvider extends Object implements TimeProvider
| Modifier and Type | Field and Description |
|---|---|
static UniqueMicroTimeProvider |
INSTANCE |
| Constructor and Description |
|---|
UniqueMicroTimeProvider()
Create new instances for testing purposes as it is stateful
|
| Modifier and Type | Method and Description |
|---|---|
long |
currentTimeMicros() |
long |
currentTimeMillis() |
long |
currentTimeNanos() |
UniqueMicroTimeProvider |
provider(TimeProvider provider) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcurrentTimepublic static final UniqueMicroTimeProvider INSTANCE
public UniqueMicroTimeProvider()
public UniqueMicroTimeProvider provider(TimeProvider provider) throws IllegalStateException
IllegalStateExceptionpublic long currentTimeMillis()
currentTimeMillis in interface TimeProviderpublic long currentTimeMicros()
throws IllegalStateException
currentTimeMicros in interface TimeProviderIllegalStateExceptionpublic long currentTimeNanos()
throws IllegalStateException
currentTimeNanos in interface TimeProviderIllegalStateExceptionCopyright © 2023. All rights reserved.