code: public long getDuration( TimeUnit unit ) {
          if (unit == null) throw new IllegalArgumentException();
          return unit.convert(durationInNanos, TimeUnit.NANOSECONDS);
      }
docs: Get the duration value in the supplied unit of time.
  
  @param unit the unit of time for the returned value; may not be null
  @return the value of this duration in the supplied unit of time