jvmMain.io.github.lyxnx.util.time.Duration.kt Maven / Gradle / Ivy
@file:JvmName("DurationJvmKt")
package io.github.lyxnx.util.time
import java.time.Duration
/**
* Sums all the durations within this iterable
*
* If the iterable is empty, the result is [Duration.ZERO]
*/
public fun Iterable.sum(): Duration = fold(Duration.ZERO, Duration::plus)