Package-level declarations

Kotlin operator overloads for ergonomic Duration operations.

Functions

Link copied to clipboard
operator fun Duration.div(divisor: Duration): Long

Divides this by a duration divisor to produce a long, rounded down.

operator fun Duration.div(divisor: Double): Duration

Divides this by a double divisor.

operator fun Duration.div(divisor: Long): Duration

Divides this by a long divisor.

Link copied to clipboard
operator fun Instant.minus(duration: Duration): Instant

Subtracts a duration from an instant, to produce another instant.

operator fun Instant.minus(other: Instant): Duration

Subtracts an instant from another instant, represented as a duration.

Link copied to clipboard
operator fun Instant.plus(duration: Duration): Instant

Adds a duration to an instant, to produce another instant.

Link copied to clipboard
operator fun Duration.rangeTo(other: Duration): Interval

Create an interval between two durations, including both endpoints, using the .. operator.

Link copied to clipboard
operator fun Duration.rangeUntil(other: Duration): Interval

Create an interval between two durations, including the start and excluding the end, using the ..< operator.

Link copied to clipboard
operator fun Duration.rem(divisor: Duration): Duration

Remainder division between this and another duration.

Link copied to clipboard
operator fun Duration.unaryMinus(): Duration

Negation operator for durations.