Try the revamped Kotlin docs design →
Try the revamped Kotlin docs design!
toDuration
Returns a Duration equal to this Double number of the specified unit.
Depending on its magnitude, the value is rounded to an integer number of nanoseconds or milliseconds.
Exceptions
IllegalArgumentException
- if this Double
value is NaN
.