Constructor | Description |
---|---|
PreciseTimestamp() |
|
PreciseTimestamp(long milliseconds,
long nanoseconds) |
Modifier and Type | Method | Description |
---|---|---|
long |
calcDifferenceInNanoseconds(Timestamp other) |
Gets the difference to the passed timestamps in nanoseconds.
|
java.util.Date |
toDate() |
Converts the timestamp to a
Date . |
java.time.Instant |
toInstant() |
Converts the timestamp to an
Instant . |
java.sql.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 java.util.Date toDate()
Timestamp
Date
.public java.time.Instant toInstant()
Timestamp
Instant
.public java.sql.Timestamp toSqlTimestamp()
Timestamp
SQL Timestamp
.toSqlTimestamp
in interface Timestamp
SQL Timestamp
public long calcDifferenceInNanoseconds(Timestamp other)
Timestamp
calcDifferenceInNanoseconds
in interface Timestamp
other
- Timestamp to subtractCopyright © 2022. All rights reserved.