Commit ccb21c0b authored by Frede H's avatar Frede H Committed by GitHub

Merge pull request #51 from fhdk/master

Simplify last_sync calculation issue #50 
parents b5ab58fc 82586dcd
......@@ -615,9 +615,12 @@ class PacmanMirrors:
:return: elapsed_time
"""
total_seconds = (point_in_time - timestamp).total_seconds()
hrs = str(int(total_seconds / 3600)).zfill(2)
mins = str(int(total_seconds % 3600 / 60)).zfill(2)
elapsed_time = "{}:{}".format(hrs, mins)
total_minutes = total_seconds // 60
elapsed_hours = total_minutes // 60
elapsed_minutes = total_minutes % 60
elapsed_time = "{}:{}".format(
str(int(elapsed_hours)).zfill(2),
str(int(elapsed_minutes)).zfill(2))
return elapsed_time
@staticmethod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment