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 TypeMethodDescriptionboolean
static @NonNull Timestamp
fromInstant
(@NonNull Instant instant) static @NonNull Timestamp
fromMillis
(long millis) Constructs aTimestamp
from milliseconds since UNIX epoch.@org.checkerframework.checker.nullness.qual.NonNull long
@NonNull Instant
getValue()
This is an alias fortoInstant()
int
hashCode()
toProto()
toString()
-
Constructor Details
-
Timestamp
public Timestamp(long value) Constructs aTimestamp
from a microsecond value.- Parameters:
value
- The number of microseconds since UNIX epoch.
-
-
Method Details
-
fromMillis
Constructs aTimestamp
from 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()
-