Fake POW notification progress tweaks
This commit is contained in:
parent
3a98cc115a
commit
973e4a0dca
@ -73,7 +73,7 @@ class ProofOfWorkNotification(ctx: Context) : AbstractNotification(ctx) {
|
|||||||
|
|
||||||
fun start(item: ProofOfWorkService.PowItem) {
|
fun start(item: ProofOfWorkService.PowItem) {
|
||||||
val expectedPowTimeInMilliseconds = PowStats.getExpectedPowTimeInMilliseconds(ctx, item.targetValue)
|
val expectedPowTimeInMilliseconds = PowStats.getExpectedPowTimeInMilliseconds(ctx, item.targetValue)
|
||||||
val delta = (expectedPowTimeInMilliseconds / 2).toInt()
|
val delta = (expectedPowTimeInMilliseconds / 3).toInt()
|
||||||
startTime = System.currentTimeMillis()
|
startTime = System.currentTimeMillis()
|
||||||
progress = 0
|
progress = 0
|
||||||
progressMax = delta
|
progressMax = delta
|
||||||
@ -81,7 +81,7 @@ class ProofOfWorkNotification(ctx: Context) : AbstractNotification(ctx) {
|
|||||||
notification = builder.build()
|
notification = builder.build()
|
||||||
show()
|
show()
|
||||||
|
|
||||||
timer = fixedRateTimer(initialDelay = 5000, period = 5000){
|
timer = fixedRateTimer(initialDelay = 2000, period = 2000){
|
||||||
val elapsedTime = System.currentTimeMillis() - startTime
|
val elapsedTime = System.currentTimeMillis() - startTime
|
||||||
progress = elapsedTime.toInt()
|
progress = elapsedTime.toInt()
|
||||||
progressMax = progress + delta
|
progressMax = progress + delta
|
||||||
|
Loading…
Reference in New Issue
Block a user