Skip to content

Commit

Permalink
Improve buzzer timeout (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
valterc authored Jan 1, 2024
1 parent 8e9edc9 commit f39136e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class BuzzerData {

public static final long TIME_MS_BUZZER_ON = 500;
public static final long TIME_MS_BUZZER_ON = 1000;

private int sequenceNumber;
private long time;
Expand All @@ -24,7 +24,7 @@ public void resetTime() {
}

public boolean isExpired() {
return System.currentTimeMillis() - time > TIME_MS_BUZZER_ON;
return time != 0 && System.currentTimeMillis() - time > TIME_MS_BUZZER_ON;
}

}

0 comments on commit f39136e

Please sign in to comment.