Skip to content

An api easily create and coding as simple to timer.

Notifications You must be signed in to change notification settings

hirosukt/TimerAPI

Repository files navigation

timer-api

An api easily create and coding as simple to timer.

Usage

Add below to build.gradle.kts.

repositories {
    maven("https://repo.hirosuke.me/snapshots")
}
dependencies {
    compileOnly("love.chihuyu:timer-api:1.4.0-SNAPSHOT")
}

Example

// this timer length is 180 * 20(1sec) = 3600tick(3min)
val timer = TimerAPI.build("wait ramen", duration = 180, period = 20, delay = 0)
    .start {
        hotWater.drip()
    }
    .tick {
        some()
    }
    .end {
        ramen.eat()
    }

timer.run()

About

An api easily create and coding as simple to timer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages