remember Jenga Countdown
fun rememberJengaCountdown(duration: Duration, key: Any? = null, timeSource: TimeSource = TimeSource.Monotonic): JengaCountdownState(source)
Remembers a JengaCountdownState that starts at duration and ticks down while composed.
It restarts when key changes. It does not survive configuration changes or process death; hold a deadline in a view model for that and pass the remaining time to JengaOtpResend directly.
Parameters
duration
how long to count down from.
key
restarts the countdown when it changes.
time Source
the clock; pass a TestTimeSource in tests.