summaryrefslogtreecommitdiff
path: root/format-common/src/main
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-12-19 15:18:55 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2022-12-19 15:18:55 +0530
commit93d51f0412e0e3597769a0173fcf8241f2df373c (patch)
tree095eebcc0e299659ee1a7ca94d3dd4940154aa75 /format-common/src/main
parent5c35acdfbcffdacb2e35b51dcbd8e279db44c5ae (diff)
fix(format-common): fix incorrect TOTP emission delay
Fixes #2167
Diffstat (limited to 'format-common/src/main')
-rw-r--r--format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt3
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()