hours

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
inline val Int.hours: <ERROR CLASS>

Returns a Duration equal to this Int number of hours.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
inline val Long.hours: <ERROR CLASS>

Returns a Duration equal to this Long number of hours.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
inline val Double.hours: <ERROR CLASS>

Returns a Duration equal to this Double number of hours.

Depending on its magnitude, the value is rounded to an integer number of nanoseconds or milliseconds.

Exceptions

IllegalArgumentException - if this Double value is NaN.

Platform and version requirements: JVM (1.5), JS (1.5), Native (1.5)
@ExperimentalTime @DeprecatedSinceKotlin("1.6") fun hours(
    value: Int
): Duration
Deprecated: Use 'Int.hours' extension property from Duration.Companion instead.
@ExperimentalTime @DeprecatedSinceKotlin("1.6") fun hours(
    value: Long
): Duration
Deprecated: Use 'Long.hours' extension property from Duration.Companion instead.

Returns a Duration representing the specified value number of hours.

Platform and version requirements: JVM (1.5), JS (1.5), Native (1.5)
@ExperimentalTime @DeprecatedSinceKotlin("1.6") fun hours(
    value: Double
): Duration
Deprecated: Use 'Double.hours' extension property from Duration.Companion instead.

Returns a Duration representing the specified value number of hours.

Exceptions

IllegalArgumentException - if the provided Double value is NaN.

© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.time/-duration/hours.html