seconds

fun seconds(value: Int): Duration
fun seconds(value: Long): Duration

Returns a Duration representing the specified value number of seconds.

Since Kotlin

1.5

fun seconds(value: Double): Duration

Returns a Duration representing the specified value number of seconds.

Since Kotlin

1.5

Throws

if the provided Doublevalue is NaN.