1
0
Fork 0
mirror of synced 2024-06-25 01:20:30 +12:00

round duration number

This commit is contained in:
Nick Sweeting 2017-10-30 04:31:23 -05:00
parent 5428fc4bba
commit bf792a190d

View file

@ -44,8 +44,8 @@ def update_archive(export_path, links, resume=None, append=True):
# print timing information & summary
end_ts = datetime.now().timestamp()
seconds = round(end_ts - start_ts, 1)
duration = '{} min'.format(seconds / 60) if seconds > 60 else '{} sec'.format(seconds)
seconds = round(end_ts - start_ts, 2)
duration = '{} min'.format(round(seconds / 60, 2)) if seconds > 60 else '{} sec'.format(seconds)
print('{}[√] [{}] Archive update complete ({}){}'.format(
ANSI['green'],
datetime.now().strftime('%Y-%m-%d %H:%M:%S'),