Skip to content

Commit

Permalink
prevent eternal waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
winniehell committed Aug 3, 2012
1 parent 59134da commit fccb717
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/org/andengine/engine/handler/timer/TimerHandler.java
Expand Up @@ -33,8 +33,8 @@ public TimerHandler(final float pTimerSeconds, final ITimerCallback pTimerCallba
} }


public TimerHandler(final float pTimerSeconds, final boolean pAutoReset, final ITimerCallback pTimerCallback) { public TimerHandler(final float pTimerSeconds, final boolean pAutoReset, final ITimerCallback pTimerCallback) {
if(pTimerSeconds < 0){ if(pTimerSeconds <= 0){
throw new IllegalStateException("pTimerSeconds must be >= 0!"); throw new IllegalStateException("pTimerSeconds must be > 0!");
} }


this.mTimerSeconds = pTimerSeconds; this.mTimerSeconds = pTimerSeconds;
Expand All @@ -55,8 +55,8 @@ public void setAutoReset(final boolean pAutoReset) {
} }


public void setTimerSeconds(final float pTimerSeconds) { public void setTimerSeconds(final float pTimerSeconds) {
if(pTimerSeconds < 0){ if(pTimerSeconds <= 0){
throw new IllegalStateException("pTimerSeconds must be >= 0!"); throw new IllegalStateException("pTimerSeconds must be > 0!");
} }


this.mTimerSeconds = pTimerSeconds; this.mTimerSeconds = pTimerSeconds;
Expand Down

0 comments on commit fccb717

Please sign in to comment.