code: private Period setTimeUnitValue(TimeUnit unit, float value) {
      if (value < 0) {
        throw new IllegalArgumentException("value: " + value);
      }
      return setTimeUnitInternalValue(unit, (int)(value * 1000) + 1);
    }
docs: Set the unit's internal value, converting from float to int.