code: public LocalTime truncatedTo(TemporalUnit unit) {
          if (unit == ChronoUnit.NANOS) {
              return this;
          }
          Duration unitDur = unit.getDuration();
          if (unitDur.getSeconds() > SECONDS_PER_DAY) {
              throw new DateTimeException("Unit is too large to be used for truncation");
          }
          long dur = unitDur.toNanos();
          if ((NANOS_PER_DAY % dur) != 0) {
              throw new DateTimeException("Unit must divide into a standard day without remainder");
          }
          long nod = toNanoOfDay();
          return ofNanoOfDay((nod / dur) * dur);
      }
docs: Returns a copy of this {@code LocalTime} with the time truncated.
  <p>
  Truncating the time returns a copy of the original time with fields
  smaller than the specified unit set to zero.
  For example, truncating with the {@link ChronoUnit#MINUTES minutes} unit
  will set the second-of-minute and nano-of-second field to zero.
  <p>
  The unit must have a {@linkplain TemporalUnit#getDuration() duration}
  that divides into the length of a standard day without remainder.
  This includes all supplied time units on {@link ChronoUnit} and
  {@link ChronoUnit#DAYS DAYS}. Other units throw an exception.
  <p>
  This instance is immutable and unaffected by this method call.
  
  @param unit  the unit to truncate to, not null
  @return a {@code LocalTime} based on this time with the time truncated, not null
  @throws DateTimeException if unable to truncate