From 976357aa287bd6cca9a1a4bd0eeea282455088a7 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 13 Jul 2020 20:23:52 +1200 Subject: [PATCH] Faster timer for checking updates after restart --- src/main/java/me/libraryaddict/disguise/DisguiseConfig.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java b/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java index 66d853d6..e655a636 100644 --- a/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java +++ b/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java @@ -316,6 +316,11 @@ public class DisguiseConfig { long timeSinceLast = System.currentTimeMillis() - (getLastUpdateRequest() + TimeUnit.HOURS.toMillis(6)); + // Change timer to 30 min if longer than that + if (timeSinceLast > TimeUnit.MINUTES.toMillis(30)) { + timeSinceLast = TimeUnit.MINUTES.toMillis(30); + } + if (timeSinceLast > 0) { timeSinceLast /= 50; } else {