Try the revamped Kotlin docs design →
Try the revamped Kotlin docs design!
milliseconds
Returns a Duration equal to this Int number of milliseconds.
Returns a Duration equal to this Long number of milliseconds.
Returns a Duration equal to this Double number of milliseconds.
Depending on its magnitude, the value is rounded to an integer number of nanoseconds or milliseconds.
Exceptions
IllegalArgumentException
- if this Double value is NaN
.
@ExperimentalTime @DeprecatedSinceKotlin("1.6", "1.8", "1.9") fun milliseconds(
value: Int
): Duration
(source)
Deprecated: Use 'Int.milliseconds' extension property from Duration.Companion instead.
@ExperimentalTime @DeprecatedSinceKotlin("1.6", "1.8", "1.9") fun milliseconds(
value: Long
): Duration
(source)
Deprecated: Use 'Long.milliseconds' extension property from Duration.Companion instead.
Returns a Duration representing the specified value number of milliseconds.
@ExperimentalTime @DeprecatedSinceKotlin("1.6", "1.8", "1.9") fun milliseconds(
value: Double
): Duration
(source)
Deprecated: Use 'Double.milliseconds' extension property from Duration.Companion instead.
Returns a Duration representing the specified value number of milliseconds.
Exceptions
IllegalArgumentException
- if the provided Double
value is NaN
.