toDuration

Returns a Duration equal to this Int number of the specified unit.

Since Kotlin

1.3

Returns a Duration equal to this Long number of the specified unit.

Since Kotlin

1.3

Returns a Duration equal to this Double number of the specified unit.

Since Kotlin

1.3

Throws

if this Double value is NaN.