mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
format-common: don't use hard-coded currentTimeMillis in TOTP logic
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
@@ -87,7 +87,7 @@ constructor(
|
||||
if (totpSecret != null) {
|
||||
scope.launch {
|
||||
updateTotp(clock.millis())
|
||||
val remainingTime = totpPeriod - (System.currentTimeMillis() % totpPeriod)
|
||||
val remainingTime = totpPeriod - (clock.millis() % totpPeriod)
|
||||
delay(Duration.seconds(remainingTime))
|
||||
repeat(Int.MAX_VALUE) {
|
||||
updateTotp(clock.millis())
|
||||
|
Reference in New Issue
Block a user