Class InstantConverter

java.lang.Object
com.hedera.hashgraph.sdk.InstantConverter

final class InstantConverter extends Object
Instance in time utilities.
  • Method Details

    • fromProtobuf

      static Instant fromProtobuf(Timestamp timestamp)
      Create an instance from a timestamp protobuf.
      Parameters:
      timestamp - the protobuf
      Returns:
      the instance
    • fromProtobuf

      static Instant fromProtobuf(TimestampSeconds timestampSeconds)
      Create an instance from a timestamp in seconds protobuf.
      Parameters:
      timestampSeconds - the protobuf
      Returns:
      the instance
    • toProtobuf

      static Timestamp toProtobuf(Instant instant)
      Convert an instance into a timestamp.
      Parameters:
      instant - the instance
      Returns:
      the timestamp
    • toProtobuf

      static Timestamp toProtobuf(Duration duration)
    • toSecondsProtobuf

      static TimestampSeconds toSecondsProtobuf(Instant instant)
      Convert an instance into a timestamp in seconds.
      Parameters:
      instant - the instance
      Returns:
      the timestamp in seconds