logging range fixes
This commit is contained in:
1 parent
4f531fe4cb
commit
dfbc35eeb9
1 file changed
+3
-3
@@ -34,11 +34,11 @@ def hr_time(seconds):
|
|||||||
if seconds >= 3600:
|
if seconds >= 3600:
|
||||||
h = seconds // 3600
|
h = seconds // 3600
|
||||||
seconds -= h * 3600
|
seconds -= h * 3600
|
||||||
s += f'{h}h'
|
s += f'{int(h)}h'
|
||||||
if seconds >= 60 or len(s) > 0:
|
if seconds >= 60 or len(s) > 0:
|
||||||
m = seconds // 60
|
m = seconds // 60
|
||||||
seconds -= m * 60
|
seconds -= m * 60
|
||||||
s += f'{m}m'
|
s += f'{int(m)}m'
|
||||||
return f'{s}{int(seconds)}s'
|
return f'{s}{int(seconds)}s'
|
||||||
|
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ class Log:
|
|||||||
yield i
|
yield i
|
||||||
current_time = time.perf_counter()
|
current_time = time.perf_counter()
|
||||||
if current_time > lastlog_time + log_interval:
|
if current_time > lastlog_time + log_interval:
|
||||||
work_done = elem / elems
|
work_done = (elem + 1) / elems
|
||||||
elapsed_time = current_time - start_time
|
elapsed_time = current_time - start_time
|
||||||
total_time = elapsed_time / work_done
|
total_time = elapsed_time / work_done
|
||||||
remaining_time = total_time - elapsed_time
|
remaining_time = total_time - elapsed_time
|
||||||
|
|||||||
Reference in new issue
Block a user