plusAssign

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
operator fun plusAssign(duration: Duration)

Advances the current reading value of this time source by the specified duration.

duration value is rounded down towards zero when converting it to a Long number of nanoseconds. For example, if the duration being added is 0.6.nanoseconds, the reading doesn't advance because the duration value is rounded to zero nanoseconds.

Exceptions

IllegalStateException - when the reading value overflows as the result of this operation.

© 2010–2020 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/-test-time-source/plus-assign.html