@ManagedAttribute @Description("The time unit of the reported durations."
            + "One of: NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, HOURS, DAY. May be abbreviated.")
    public void setDuration(final String durationName) {
        final String trimName = (durationName != null) ? durationName.trim() : null;
        if (durationName == null || trimName.isEmpty()) {
            throw new IllegalArgumentException("Empty value not allowed");
        }
        for (TimeUnit unit : TimeUnit.values()) {
            if (unit.toString().toUpperCase().startsWith(trimName.toUpperCase())) {
                setDurationUnit(unit);
                return;
            }
        }
        throw new IllegalArgumentException("Unknown time unit: '" + trimName + "'");
    }