Typecast into "int"

This commit is contained in:
Aniket21mathur 2019-07-17 12:42:22 +05:30 committed by James Cameron
parent e4725ad196
commit 5043d53e7b

View File

@ -267,7 +267,7 @@ def timestamp_to_elapsed_string(timestamp, max_levels=2):
elapsed_seconds = int(time.time() - timestamp) elapsed_seconds = int(time.time() - timestamp)
for name_singular, name_plural, factor in units: for name_singular, name_plural, factor in units:
elapsed_units = elapsed_seconds / factor elapsed_units = int(elapsed_seconds / factor)
if elapsed_units > 0: if elapsed_units > 0:
if levels > 0: if levels > 0: