mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 22:05:19 +00:00
@@ -15,6 +15,7 @@ import dagger.assisted.AssistedFactory
|
|||||||
import dagger.assisted.AssistedInject
|
import dagger.assisted.AssistedInject
|
||||||
import kotlin.collections.set
|
import kotlin.collections.set
|
||||||
import kotlin.coroutines.coroutineContext
|
import kotlin.coroutines.coroutineContext
|
||||||
|
import kotlin.time.Duration.Companion.milliseconds
|
||||||
import kotlin.time.Duration.Companion.seconds
|
import kotlin.time.Duration.Companion.seconds
|
||||||
import kotlin.time.ExperimentalTime
|
import kotlin.time.ExperimentalTime
|
||||||
import kotlinx.coroutines.awaitCancellation
|
import kotlinx.coroutines.awaitCancellation
|
||||||
@@ -63,7 +64,7 @@ constructor(
|
|||||||
do {
|
do {
|
||||||
val otp = calculateTotp()
|
val otp = calculateTotp()
|
||||||
emit(otp)
|
emit(otp)
|
||||||
delay(ONE_SECOND.seconds)
|
delay(ONE_SECOND.milliseconds)
|
||||||
} while (coroutineContext.isActive)
|
} while (coroutineContext.isActive)
|
||||||
} else {
|
} else {
|
||||||
awaitCancellation()
|
awaitCancellation()
|
||||||
|
Reference in New Issue
Block a user