Class ProtobufTimeUtils
java.lang.Object
io.temporal.internal.common.ProtobufTimeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.protobuf.Timestampstatic DurationtoJavaDuration(com.google.protobuf.Duration d) Converts a Protobuf Duration to a Java Duration with millisecond precision.static InstanttoJavaInstant(com.google.protobuf.Timestamp t) static com.uber.m3.util.DurationtoM3Duration(com.google.protobuf.Timestamp to, com.google.protobuf.Timestamp from) static com.uber.m3.util.DurationtoM3DurationSinceNow(com.google.protobuf.Timestamp t) static com.google.protobuf.DurationConverts a Java Duration to a Protobuf Duration with millisecond precision.static com.google.protobuf.Timestamp
-
Constructor Details
-
ProtobufTimeUtils
public ProtobufTimeUtils()
-
-
Method Details
-
toJavaDuration
Converts a Protobuf Duration to a Java Duration with millisecond precision. Null inputs are treated as zero. -
toProtoDuration
Converts a Java Duration to a Protobuf Duration with millisecond precision. Null inputs are treated as zero. -
getCurrentProtoTime
public static com.google.protobuf.Timestamp getCurrentProtoTime() -
toM3Duration
public static com.uber.m3.util.Duration toM3Duration(com.google.protobuf.Timestamp to, com.google.protobuf.Timestamp from) -
toM3DurationSinceNow
public static com.uber.m3.util.Duration toM3DurationSinceNow(com.google.protobuf.Timestamp t) -
toJavaInstant
-
toProtoTimestamp
-