Try the revamped Kotlin docs design →
Try the revamped Kotlin docs design!
microseconds
Returns a Duration equal to this Int number of microseconds.
Returns a Duration equal to this Long number of microseconds.
Returns a Duration equal to this Double number of microseconds.
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 microseconds(
value: Int
): Duration
(source)
Deprecated: Use 'Int.microseconds' extension property from Duration.Companion instead.
@ExperimentalTime @DeprecatedSinceKotlin("1.6", "1.8", "1.9") fun microseconds(
value: Long
): Duration
(source)
Deprecated: Use 'Long.microseconds' extension property from Duration.Companion instead.
Returns a Duration representing the specified value number of microseconds.
@ExperimentalTime @DeprecatedSinceKotlin("1.6", "1.8", "1.9") fun microseconds(
value: Double
): Duration
(source)
Deprecated: Use 'Double.microseconds' extension property from Duration.Companion instead.
Returns a Duration representing the specified value number of microseconds.
Exceptions
IllegalArgumentException
- if the provided Double
value is NaN
.