times

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
operator fun times(scale: Int): Duration

Returns a duration whose value is this duration value multiplied by the given scale number.

Exceptions

IllegalArgumentException - if the operation results in an undefined value for the given arguments, e.g. when multiplying an infinite duration by zero.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
operator fun times(scale: Double): Duration

Returns a duration whose value is this duration value multiplied by the given scale number.

The operation may involve rounding when the result cannot be represented exactly with a Double number.

Exceptions

IllegalArgumentException - if the operation results in an undefined value for the given arguments, e.g. when multiplying an infinite duration by zero.

© 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/times.html