All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.github.lyxnx.util.time.Duration.kt Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
package io.github.lyxnx.util.time

import kotlin.jvm.JvmSynthetic
import kotlin.time.Duration

/**
 * Sums all the durations within this iterable
 *
 * If the iterable is empty, the result is [Duration.ZERO]
 */
@JvmSynthetic // kotlin Duration is a value class, so to the JVM is represented as a long instead
public fun Iterable.sum(): Duration = fold(Duration.ZERO, Duration::plus)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy