nanoseconds

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

Returns a Duration equal to this Int number of nanoseconds.

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

Returns a Duration equal to this Long number of nanoseconds.

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

Returns a Duration equal to this Double number of nanoseconds.

Exceptions

IllegalArgumentException - if this Double value is NaN.