code: public long toNanos() {
          long totalNanos = Math.multiplyExact(seconds, NANOS_PER_SECOND);
          totalNanos = Math.addExact(totalNanos, nanos);
          return totalNanos;
      }
docs: Converts this duration to the total length in nanoseconds expressed as a {@code long}.
  <p>
  If this duration is too large to fit in a {@code long} nanoseconds, then an
  exception is thrown.
  
  @return the total length of the duration in nanoseconds
  @throws ArithmeticException if numeric overflow occurs