duration = time.perf_counter() - start_time
- if total_nb_validated > 0 and total_nb_validated < nb_to_create:
- d = (nb_to_create - total_nb_validated) * duration / total_nb_validated
- e = (datetime.datetime.now() + datetime.timedelta(seconds=d)).strftime(
- "%a %H:%M"
- )
+ if total_nb_validated > 0:
+ if total_nb_validated < nb_to_create:
+ d = (nb_to_create - total_nb_validated) * duration / total_nb_validated
+ e = (datetime.datetime.now() + datetime.timedelta(seconds=d)).strftime(
+ "%a %H:%M"
+ )
+ else:
+ e = "now!"
else:
e = "???"