diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2022-12-19 15:18:55 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2022-12-19 15:18:55 +0530 |
commit | 93d51f0412e0e3597769a0173fcf8241f2df373c (patch) | |
tree | 095eebcc0e299659ee1a7ca94d3dd4940154aa75 /format-common | |
parent | 5c35acdfbcffdacb2e35b51dcbd8e279db44c5ae (diff) |
fix(format-common): fix incorrect TOTP emission delay
Fixes #2167
Diffstat (limited to 'format-common')
-rw-r--r-- | format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt b/format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt index cda8138e..b66e3f72 100644 --- a/format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt +++ b/format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt @@ -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() |