Timestamp¶
-
public class
Timestamp
implements Comparable<Timestamp>¶ Data structure representing a unique timestamp.
Methods¶
getClockId¶
-
public byte[]
getClockId
()¶ Returns: the unique identifier of the clock that created this Timestamp.
getTime¶
-
public long
getTime
()¶ Return the time as a 64-bit long, where:
- The higher 32-bit represent the number of seconds since midnight, January 1, 1970 UTC
- The lower 32-bit represent a fraction of 1 second.
WARNING: this time cannot be used with
java.util.Date.Date(long)
. Rather usegetTimeAsInstant()
.Returns: the time as a 64-bits NTP time.
getTimeAsInstant¶
-
public Instant
getTimeAsInstant
()¶ Returns: the Timestamp’s creation time as a java.time.Instant
.