fix: padding + time

This commit is contained in:
gdamms 2022-03-26 17:37:07 +01:00
parent 2fd07da707
commit 1a55616266
2 changed files with 4 additions and 3 deletions

View file

@ -27,7 +27,7 @@ SECONDARY_COLOR_SLIDER = (380, 380 + TEAM_OFFSET)
ITEM_X = (200, 450, 700)
ITEM_Y = (300, 580, 860)
NB_STICKERS = (3, 3)
NB_STICKERS = (0, 0, 3, 3)
NB_WHEELS = 23
NB_HATS = 20
NB_TEAMS = 2

View file

@ -36,7 +36,7 @@ if __name__ == "__main__":
digits_loadout = len(str(nb_loadouts))
# initialisation de la liste au calcul de l'ETA
eta_list = [2.0 for _ in range(NB_ETA)]
eta_list = [10.0 for _ in range(NB_ETA)]
# boucle principale sur les loadouts
for (i, loadout) in enumerate(loadouts):
@ -71,9 +71,10 @@ if __name__ == "__main__":
elapsed = time.time() - elapsed
eta_list[i % NB_ETA] = elapsed
estimation = int((nb_loadouts - i) * sum(eta_list) / NB_ETA)
formated_estimation = datetime.timedelta(seconds=estimation)
logging.debug(
f"loadout {str(i).zfill(digits_loadout)}/{nb_loadouts} ({elapsed:.02f}s, ETA: {datetime.timedelta(seconds=estimation)}): {loadout}"
f"loadout {str(i).zfill(digits_loadout)}/{nb_loadouts} ({elapsed:.02f}s, ETA: {formated_estimation}): {loadout}"
)
# fermeture de la db sqlite3