Skip to content

Commit

Permalink
Time fix
Browse files Browse the repository at this point in the history
timer was 1 second too long
  • Loading branch information
Thespacemanfil committed May 30, 2024
1 parent 3c99abd commit 0a7785b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AirRec.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def mode_choices(settings):
settings.update({
"slideshow_length": 4,
"primary_time": 5,
"answers": True,
"answers": False,
"secondary_time": 0,
"secondary_black": False,
"variance": 2,
Expand Down Expand Up @@ -220,13 +220,13 @@ def present_slide():

def update_timer():
nonlocal remaining_time
if remaining_time > 0:
if remaining_time > 1:
remaining_time -= 1
timer_label.config(text=str(remaining_time))
rootafters.append(root.after(1000, update_timer))

if remaining_time != -1:
rootafters.append(root.after((remaining_time*1000), next_slide))
rootafters.append(root.after((remaining_time - 1) * 1000, next_slide))
update_timer()

root.mainloop()
Expand Down

0 comments on commit 0a7785b

Please sign in to comment.