aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-12 18:31:28 +0100
committerGravatar jesopo2018-10-12 18:31:28 +0100
commited032794068aa73bf497c2e8f6d09abd7786aa5c (patch)
treee95f1eea3684e67682155bc6aad72150cb4a86c7
parentUse Timers.get_timers() instead of Timers.timers (diff)
signature
Correct the logic used to find the time until the next lottery
-rw-r--r--modules/coins.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/coins.py b/modules/coins.py
index 87053001..649974cf 100644
--- a/modules/coins.py
+++ b/modules/coins.py
@@ -10,7 +10,7 @@ DECIMAL_ZERO = decimal.Decimal("0")
REGEX_FLOAT = re.compile("(?:\d+(?:\.\d{1,2}|$)|\.\d{1,2})")
DEFAULT_MARKET_CAP = str(1_000_000_000)
-HOUR_MILLISECONDS = ((1*60)*60)*1000
+HOUR_SECONDS = (1*60)*60
LOTTERY_INTERVAL = (60*60)*6 # 6 hours
LOTTERY_BUYIN = "100.00"
@@ -44,8 +44,8 @@ class Module(ModuleManager.BaseModule):
def _until_next_6_hour(self):
now = datetime.datetime.utcnow()
until_next_hour = self._until_next_hour(now)
- until_next_6_hour = 6 - (now.hour % 6)
- until_next_6_hour = until_next_6_hour*HOUR_MILLISECONDS
+ until_next_6_hour = (6-(now.hour%6))-1
+ until_next_6_hour = until_next_6_hour*HOUR_SECONDS
return until_next_hour+until_next_6_hour
def _get_pool(self, server):