Timer
Timer is a general purpose kotlin library that use kotlin coroutines, flows and channels to provide timer features with the most easy and efficient way
FEATURES
- Stopwatch
- Countdown timer
- Observe timer using coroutine flow that emits
Time()
class which provide time in an easy and formatted way - Stopwatch laps
- Start, pause, resume and reset timer
- Configure countdown timer timer and delay anytime
- Get the current status of the stopwatch
- Attach
CoroutineScope
likeviewModelScope
orlifecycleScope
to the class constructor to cancel active coroutines or use the default scope provided by the class and callclear()
function to prevent any memory leak
USAGE
Add the JitPack repository to your root build.gradle file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency using Groovy
implementation 'com.github.amrmsaraya:timer:1.0.3'
Add the dependency using Kotlin DSL
implementation("com.github.amrmsaraya:timer:1.0.3")
LICENSE
Timer library is licensed under Apache License 2.0