Skip to content

Commit

Permalink
do not start timer if already running; closes #1045
Browse files Browse the repository at this point in the history
  • Loading branch information
jflamy committed Jul 20, 2024
1 parent e1dcc4e commit eeabdde
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions owlcms/src/main/java/app/owlcms/fieldofplay/FieldOfPlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,10 @@ public synchronized void handleFOPEvent(FOPEvent e) {
} else if (e instanceof ForceTime) {
doForceTime((ForceTime) e);
} else if (e instanceof TimeStarted) {
// something is stuck
getAthleteTimer().start();
if (!getAthleteTimer().isRunning()) {
// don't start if already running
getAthleteTimer().start();
}
return;
} else {
unexpectedEventInState(e, TIME_RUNNING);
Expand Down Expand Up @@ -963,16 +965,7 @@ public synchronized void handleFOPEvent(FOPEvent e) {
transitionToBreak((FOPEvent.BreakStarted) this.deferredBreak);
this.deferredBreak = null;
}
}
// When the decision is visible, the time has already been set to next athlete.
// the timekeeper should have restarted the time during the 3 seconds.
// else if (e instanceof TimeStarted) {
// // needed if decision has been given too early (e.g. bar did not reach the knees but reds given)
// resetDecisions();
// setState(TIME_RUNNING);
// getAthleteTimer().start();
// }
else {
} else {
unexpectedEventInState(e, DECISION_VISIBLE);
}
break;
Expand Down

0 comments on commit eeabdde

Please sign in to comment.