public class NanosecondTimestampStrategy extends Object implements TimestampStrategy
TimestampStrategy that may provide
nanosecond resolution, if available, or millisecond resolution.
The the Clock documentation says: "The system factory methods
provide clocks based on the best available system clock. This may use
System.currentTimeMillis(), or a higher resolution clock if one is
available".
It's slower than DefaultTimestampStrategy.| Modifier and Type | Field and Description |
|---|---|
static long |
GREGORIAN_SECONDS |
static long |
NANOSECONDS_PER_SECOND |
static long |
TIMESTAMP_RESOLUTION |
| Constructor and Description |
|---|
NanosecondTimestampStrategy() |
| Modifier and Type | Method and Description |
|---|---|
long |
getTimestamp() |
public static final long NANOSECONDS_PER_SECOND
public static final long TIMESTAMP_RESOLUTION
public static final long GREGORIAN_SECONDS
public long getTimestamp()
getTimestamp in interface TimestampStrategyCopyright © 2020. All rights reserved.