seconds

val Int.seconds: Duration

Returns a Duration equal to this Int number of seconds.

Since Kotlin

1.3

val Long.seconds: Duration

Returns a Duration equal to this Long number of seconds.

Since Kotlin

1.3

val Double.seconds: Duration

Returns a Duration equal to this Double number of seconds.

Since Kotlin

1.3

Throws

if this Double value is NaN.