summaryrefslogtreecommitdiff
path: root/format-common/src
diff options
context:
space:
mode:
Diffstat (limited to 'format-common/src')
-rw-r--r--format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt b/format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt
index 9b7fc8f3..05afd8c2 100644
--- a/format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt
+++ b/format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt
@@ -14,6 +14,7 @@ import dev.msfjarvis.aps.util.totp.Otp
import dev.msfjarvis.aps.util.totp.TotpFinder
import kotlin.collections.set
import kotlin.time.ExperimentalTime
+import kotlin.time.seconds
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
@@ -83,10 +84,10 @@ constructor(
scope.launch {
updateTotp(clock.millis())
val remainingTime = totpPeriod - (System.currentTimeMillis() % totpPeriod)
- delay(remainingTime)
+ delay(remainingTime.seconds)
repeat(Int.MAX_VALUE) {
updateTotp(clock.millis())
- delay(totpPeriod)
+ delay(totpPeriod.seconds)
}
}
}