Class Duration


public class Duration extends Object
Duration instances represent a lapse of time. Internally, the duration is stored in milliseconds. However, whenever a parameter of type Duration is expected, Joran (logback's configuration system) will automatically convert strings such as "20 seconds" "3.5 minutes" or "5 hours" into Duration instances.

The recognized units of time are the "millisecond", "second", "minute" "hour" and "day". The unit name may be followed by an "s". Thus, "2 day" and "2 days" are equivalent. In the absence of a time unit specification, milliseconds are assumed.

Note: the conversion magic is entirely due to the fact that this class follows the valueOf(java.lang.String) convention.

Ceki Gulcu