milliseconds

Common
JVM
JS
Native
1.3
@ExperimentalTime @DeprecatedSinceKotlin("1.5", "1.8", "1.9") val Int.milliseconds: Duration
(source)
Deprecated: Use 'Int.milliseconds' extension property from Duration.Companion instead.

Returns a Duration equal to this Int number of milliseconds.

Common
JVM
JS
Native
1.3
@ExperimentalTime @DeprecatedSinceKotlin("1.5", "1.8", "1.9") val Long.milliseconds: Duration
(source)
Deprecated: Use 'Long.milliseconds' extension property from Duration.Companion instead.

Returns a Duration equal to this Long number of milliseconds.

Common
JVM
JS
Native
1.3
@ExperimentalTime @DeprecatedSinceKotlin("1.5", "1.8", "1.9") val Double.milliseconds: Duration
(source)
Deprecated: Use 'Double.milliseconds' extension property from Duration.Companion instead.

Returns a Duration equal to this Double number of milliseconds.

Exceptions

IllegalArgumentException - if this Double value is NaN.