Commit 82586dcd authored by FH's avatar FH

Simplify last_sync calculation

 (reverted from commit 9a52a570)
parent b5ab58fc
......@@ -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