static void appendDurationUnitAsStr(StringBuilder buf, DurationUnit durationUnit) {
        switch (durationUnit) {
        case NANOSECOND:
            buf.append("nanoseconds.");
            break;
        case MICROSECOND:
            buf.append("microseconds.");
            break;
        case MILLISSECOND:
            buf.append("milliseconds.");
            break;
        case SECOND:
            buf.append(" seconds.");
            break;
        }
    }
A collection of utility methods.

@author Ceki G&uuml;lc&uuml;
slf4j-ext/src/main/java/org/slf4j/profiler/Util.java