Class ProtobufTimeUtils


  • public class ProtobufTimeUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.google.protobuf.Timestamp getCurrentProtoTime()  
      static java.time.Duration toJavaDuration​(com.google.protobuf.Duration d)  
      static java.time.Instant toJavaInstant​(com.google.protobuf.Timestamp t)  
      static com.uber.m3.util.Duration toM3Duration​(com.google.protobuf.Timestamp to, com.google.protobuf.Timestamp from)  
      static com.uber.m3.util.Duration toM3DurationSinceNow​(com.google.protobuf.Timestamp t)  
      static com.google.protobuf.Duration toProtoDuration​(java.time.Duration d)  
      static com.google.protobuf.Timestamp toProtoTimestamp​(java.time.Instant t)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProtobufTimeUtils

        public ProtobufTimeUtils()
    • Method Detail

      • toJavaDuration

        public static java.time.Duration toJavaDuration​(com.google.protobuf.Duration d)
      • toProtoDuration

        public static com.google.protobuf.Duration toProtoDuration​(java.time.Duration d)
      • 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

        @Nullable
        public static java.time.Instant toJavaInstant​(@Nullable
                                                      com.google.protobuf.Timestamp t)
      • toProtoTimestamp

        @Nullable
        public static com.google.protobuf.Timestamp toProtoTimestamp​(@Nullable
                                                                     java.time.Instant t)