Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
revoltage34 committed May 24, 2021
1 parent 3d93d6b commit 1fdadf1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions gres.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,14 @@ def SaveTime(self):
file.write(str(math.floor(time.time())) + "\n" + str(resin) + "\n" + str(self.residue))
file.close()

mins = (160 - resin) * 8
self.resinTimeVar.set("Full in: " + str(math.floor(mins/60)) + "h " + str(mins%60) + "m")
self.resinDateVar.set("" + datetime.fromtimestamp(time.time() + (mins * 60)).strftime("%d %b, %H:%M (%a)") + "")
if resin <= 160:
mins = (160 - resin) * 8
self.resinTimeVar.set("Full in: " + str(math.floor(mins/60)) + "h " + str(mins%60) + "m")
self.resinDateVar.set("" + datetime.fromtimestamp(time.time() + (mins * 60)).strftime("%d %b, %H:%M (%a)") + "")
else:
mins = (resin - 160) * 8
self.resinTimeVar.set("Overflowed: " + str(math.floor(mins/60)) + "h " + str(mins%60) + "m")
self.resinDateVar.set("" + datetime.fromtimestamp(time.time() + (mins * 60)).strftime("%d %b, %H:%M (%a)") + "")

def LoadTime(self):
try:
Expand All @@ -66,8 +71,6 @@ def LoadTime(self):
if self.residue >= 480:
self.residue -= 480
resin += 1
#if resin > 160: #Resin Limit
#resin = 160

self.resinVar.set(resin)
except:
Expand Down

0 comments on commit 1fdadf1

Please sign in to comment.