public interface TimeMeter
SYSTEM_NANOTIME,
SYSTEM_MILLISECONDS| Modifier and Type | Field and Description |
|---|---|
static TimeMeter |
SYSTEM_MILLISECONDS
The implementation of
TimeMeter which works around System.currentTimeMillis() |
static TimeMeter |
SYSTEM_NANOTIME
The implementation of
TimeMeter which works around System.nanoTime() |
| Modifier and Type | Method and Description |
|---|---|
long |
currentTimeNanos()
Returns current time in nanosecond precision, but not necessarily nanosecond resolution.
|
boolean |
isWallClockBased()
Returns
true if implementation of clock behaves the similar way as System.currentTimeMillis(),
in other words if implementation can be used as wall clock. |
static final TimeMeter SYSTEM_NANOTIME
TimeMeter which works around System.nanoTime()static final TimeMeter SYSTEM_MILLISECONDS
TimeMeter which works around System.currentTimeMillis()long currentTimeNanos()
boolean isWallClockBased()
true if implementation of clock behaves the similar way as System.currentTimeMillis(),
in other words if implementation can be used as wall clock.true if implementation can be used as wall clockCopyright © 2021. All rights reserved.