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

main.wisp.sampling.Ticker.kt Maven / Gradle / Ivy

package wisp.sampling

/**
 * Abstraction for `System.nanoTime()` that allows for testing.
 */
interface Ticker {
    fun read(): Long

    companion object {
        val DEFAULT: Ticker = object : Ticker {
            override fun read(): Long {
                return System.nanoTime()
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy