mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 05:48:09 +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:
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…
x
Reference in New Issue
Block a user