mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2025-09-06 17:04:09 +02: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:
parent
0de22d7f60
commit
5f83d6f2ff
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue