fix: padding + time
This commit is contained in:
parent
2fd07da707
commit
1a55616266
|
@ -27,7 +27,7 @@ SECONDARY_COLOR_SLIDER = (380, 380 + TEAM_OFFSET)
|
||||||
ITEM_X = (200, 450, 700)
|
ITEM_X = (200, 450, 700)
|
||||||
ITEM_Y = (300, 580, 860)
|
ITEM_Y = (300, 580, 860)
|
||||||
|
|
||||||
NB_STICKERS = (3, 3)
|
NB_STICKERS = (0, 0, 3, 3)
|
||||||
NB_WHEELS = 23
|
NB_WHEELS = 23
|
||||||
NB_HATS = 20
|
NB_HATS = 20
|
||||||
NB_TEAMS = 2
|
NB_TEAMS = 2
|
||||||
|
|
|
@ -36,7 +36,7 @@ if __name__ == "__main__":
|
||||||
digits_loadout = len(str(nb_loadouts))
|
digits_loadout = len(str(nb_loadouts))
|
||||||
|
|
||||||
# initialisation de la liste au calcul de l'ETA
|
# 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
|
# boucle principale sur les loadouts
|
||||||
for (i, loadout) in enumerate(loadouts):
|
for (i, loadout) in enumerate(loadouts):
|
||||||
|
@ -71,9 +71,10 @@ if __name__ == "__main__":
|
||||||
elapsed = time.time() - elapsed
|
elapsed = time.time() - elapsed
|
||||||
eta_list[i % NB_ETA] = elapsed
|
eta_list[i % NB_ETA] = elapsed
|
||||||
estimation = int((nb_loadouts - i) * sum(eta_list) / NB_ETA)
|
estimation = int((nb_loadouts - i) * sum(eta_list) / NB_ETA)
|
||||||
|
formated_estimation = datetime.timedelta(seconds=estimation)
|
||||||
|
|
||||||
logging.debug(
|
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
|
# fermeture de la db sqlite3
|
||||||
|
|
Loading…
Reference in a new issue