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

com.lsd.core.TimeUtils.kt Maven / Gradle / Ivy

There is a newer version: 7.0.56
Show newest version
package com.lsd.core

import java.time.Duration
import java.time.Instant


fun  timedResult(block: () -> R): Pair {
    val start = Instant.now()
    val result = block.invoke()
    val stop = Instant.now()

    return Duration.between(start, stop) to result
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy