milliseconds

Returns a Duration equal to this Int number of milliseconds.

Since Kotlin

1.6

Returns a Duration equal to this Long number of milliseconds.

Since Kotlin

1.6

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.

Since Kotlin

1.6

Throws

if this Double value is NaN.


Deprecated

Warning since 1.6

Use 'Int.milliseconds' extension property from Duration.Companion instead.

Replace with

import kotlin.time.Duration.Companion.milliseconds
value.milliseconds

Returns a Duration representing the specified value number of milliseconds.

Since Kotlin

1.6

Deprecated

Warning since 1.6

Use 'Long.milliseconds' extension property from Duration.Companion instead.

Replace with

import kotlin.time.Duration.Companion.milliseconds
value.milliseconds

Returns a Duration representing the specified value number of milliseconds.

Since Kotlin

1.6

Deprecated

Warning since 1.6

Use 'Double.milliseconds' extension property from Duration.Companion instead.

Replace with

import kotlin.time.Duration.Companion.milliseconds
value.milliseconds

Returns a Duration representing the specified value number of milliseconds.

Since Kotlin

1.6

Throws

if the provided Double value is NaN.