private static ChronoUnit toChronoUnit(java.util.concurrent.TimeUnit timeUnit) {
      switch (timeUnit) {
        case NANOSECONDS:
          return ChronoUnit.NANOS;
        case MICROSECONDS:
          return ChronoUnit.MICROS;
        case MILLISECONDS:
          return ChronoUnit.MILLIS;
        case SECONDS:
          return ChronoUnit.SECONDS;
        case MINUTES:
          return ChronoUnit.MINUTES;
        case HOURS:
          return ChronoUnit.HOURS;
        case DAYS:
          return ChronoUnit.DAYS;
        default:
          throw new IllegalArgumentException(String.format("Unsupported time unit %s.", timeUnit));
      }
    }
Pretty prints the duration as a lowest granularity unit that does not lose precision.

<p>Examples:

<pre>{@code
Duration.ofMilliseconds(60000) will be printed as 1 min
Duration.ofHours(1).plusSeconds(1) will be printed as 3601 s
}</pre>

<b>NOTE:</b> It supports only durations that fit into long.
amoro-common/src/main/java/org/apache/amoro/config/ConfigHelpers.java