| Constructor and Description |
|---|
PreciseTimestamp() |
PreciseTimestamp(long milliseconds,
long nanoseconds) |
| Modifier and Type | Method and Description |
|---|---|
long |
calcDifferenceInNanoseconds(Timestamp other)
Gets the difference to the passed timestamps in nanoseconds.
|
Date |
toDate()
Converts the timestamp to a
Date. |
Instant |
toInstant()
Converts the timestamp to an
Instant. |
Timestamp |
toSqlTimestamp()
Converts the timestamp to an
SQL Timestamp. |
public PreciseTimestamp()
public PreciseTimestamp(long milliseconds,
long nanoseconds)
milliseconds - Milliseconds since January 1, 1970, 00:00:00 GMTnanoseconds - Additional nanoseconds [0 .. 1,000,000]public Date toDate()
TimestampDate.public Instant toInstant()
TimestampInstant.public Timestamp toSqlTimestamp()
TimestampSQL Timestamp.toSqlTimestamp in interface TimestampSQL Timestamppublic long calcDifferenceInNanoseconds(Timestamp other)
TimestampcalcDifferenceInNanoseconds in interface Timestampother - Timestamp to subtractCopyright © 2020. All rights reserved.