buildCountDownTimer

fun buildCountDownTimer(    millisInFuture: Long,     countDownInterval: Long,     onTimerTick: (millisUntilFinished: Long) -> Unit,     onTimerFinished: () -> Unit = {}): CountDownTimer

A utility function that is used to create an instance of CountDownTimer .

Parameters

millisInFuture

millis since epoch when timer should stop.

countDownInterval

the interval in millis after which the user receives the callbacks.

onTimerTick

a lambda that receives an instance of Long indicating the amount of time until finished.

onTimerFinished

an optional lambda the will be executed when the timer finishes.