Class InstantPrecisionUtil

java.lang.Object
com.atlassian.diagnostics.internal.util.InstantPrecisionUtil

public class InstantPrecisionUtil extends Object
  • Method Details

    • truncateNanoSecondPrecision

      public static Instant truncateNanoSecondPrecision(Instant instant)
      The Java 11 JVM offers nanosecond precision if the hardware supports it and this breaks a lot of assumptions within the diagnostics framework that a long would hold enough milliseconds since epoch precision that it's the same as an Instance object.
      Parameters:
      instant - the instant to truncate
      Returns:
      a new instant with truncated nanosecond level precision