From 973e4a0dca67b25b426fe218e993b14e23d73ab0 Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Fri, 11 Aug 2017 17:25:35 +0200 Subject: [PATCH] Fake POW notification progress tweaks --- .../dissem/apps/abit/notification/ProofOfWorkNotification.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/ch/dissem/apps/abit/notification/ProofOfWorkNotification.kt b/app/src/main/java/ch/dissem/apps/abit/notification/ProofOfWorkNotification.kt index e2190ec..eae9640 100644 --- a/app/src/main/java/ch/dissem/apps/abit/notification/ProofOfWorkNotification.kt +++ b/app/src/main/java/ch/dissem/apps/abit/notification/ProofOfWorkNotification.kt @@ -73,7 +73,7 @@ class ProofOfWorkNotification(ctx: Context) : AbstractNotification(ctx) { fun start(item: ProofOfWorkService.PowItem) { val expectedPowTimeInMilliseconds = PowStats.getExpectedPowTimeInMilliseconds(ctx, item.targetValue) - val delta = (expectedPowTimeInMilliseconds / 2).toInt() + val delta = (expectedPowTimeInMilliseconds / 3).toInt() startTime = System.currentTimeMillis() progress = 0 progressMax = delta @@ -81,7 +81,7 @@ class ProofOfWorkNotification(ctx: Context) : AbstractNotification(ctx) { notification = builder.build() show() - timer = fixedRateTimer(initialDelay = 5000, period = 5000){ + timer = fixedRateTimer(initialDelay = 2000, period = 2000){ val elapsedTime = System.currentTimeMillis() - startTime progress = elapsedTime.toInt() progressMax = progress + delta