code: public static TimeUnit timeUnit(ChronoUnit unit) {
          Objects.requireNonNull(unit, "unit");
          switch (unit) {
              case NANOS:
                  return TimeUnit.NANOSECONDS;
              case MICROS:
                  return TimeUnit.MICROSECONDS;
              case MILLIS:
                  return TimeUnit.MILLISECONDS;
              case SECONDS:
                  return TimeUnit.SECONDS;
              case MINUTES:
                  return TimeUnit.MINUTES;
              case HOURS:
                  return TimeUnit.HOURS;
              case DAYS:
                  return TimeUnit.DAYS;
              default:
                  throw new IllegalArgumentException("ChronoUnit cannot be converted to TimeUnit: " + unit);
          }
      }
docs: Converts a {@code ChronoUnit} to a {@code TimeUnit}.
  <p>
  This handles the seven units declared in {@code TimeUnit}.
  
  @param unit  the unit to convert, not null
  @return the converted unit, not null
  @throws IllegalArgumentException if the unit cannot be converted