parent
5c35acdfbc
commit
93d51f0412
1 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@ import dagger.assisted.AssistedFactory
|
|||
import dagger.assisted.AssistedInject
|
||||
import kotlin.collections.set
|
||||
import kotlin.coroutines.coroutineContext
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
import kotlin.time.ExperimentalTime
|
||||
import kotlinx.coroutines.awaitCancellation
|
||||
|
@ -63,7 +64,7 @@ constructor(
|
|||
do {
|
||||
val otp = calculateTotp()
|
||||
emit(otp)
|
||||
delay(ONE_SECOND.seconds)
|
||||
delay(ONE_SECOND.milliseconds)
|
||||
} while (coroutineContext.isActive)
|
||||
} else {
|
||||
awaitCancellation()
|
||||
|
|
Loading…
Reference in a new issue