Package com.daml.ledger.javaapi.data
Class Timestamp
java.lang.Object
com.daml.ledger.javaapi.data.Value
com.daml.ledger.javaapi.data.Timestamp
A Timestamp value is represented as microseconds since the UNIX epoch.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic @NonNull TimestampfromInstant(@NonNull Instant instant) static @NonNull TimestampfromMillis(long millis) Constructs aTimestampfrom milliseconds since UNIX epoch.@org.checkerframework.checker.nullness.qual.NonNull long@NonNull InstantgetValue()This is an alias fortoInstant()inthashCode()toProto()toString()
-
Constructor Details
-
Timestamp
public Timestamp(long value) Constructs aTimestampfrom a microsecond value.- Parameters:
value- The number of microseconds since UNIX epoch.
-
-
Method Details
-
fromMillis
Constructs aTimestampfrom milliseconds since UNIX epoch.- Parameters:
millis- milliseconds since UNIX epoch.
-
fromInstant
-
getValue
This is an alias fortoInstant()- Returns:
- the microseconds stored in this timestamp
-
getMicroseconds
public @org.checkerframework.checker.nullness.qual.NonNull long getMicroseconds() -
toInstant
- Returns:
- The point in time represented by this timestamp as
Instant.
-
toProto
-
toString
-
equals
-
hashCode
public int hashCode()
-