toDouble

Returns the value of this duration expressed as a Double number of the specified unit.

An infinite duration value is converted either to Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY depending on its sign.