Skip to content

Commit

Permalink
Merge pull request #3 from hayrich/master
Browse files Browse the repository at this point in the history
Apply fix for where countdown timer reaches target with 0.9 seconds remaining on clock
  • Loading branch information
albert-gonzalez committed Mar 15, 2016
2 parents 74aff3e + 1733599 commit 8464aa0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/easytimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ var Timer = (
function isCountdownTimerTargetAchieved() {
return counters.hours < target[HOURS_POSITION]
|| (counters.hours === target[HOURS_POSITION] && (counters.minutes < target[MINUTES_POSITION]
|| (counters.minutes === target[MINUTES_POSITION]) && counters.seconds <= target[SECONDS_POSITION]));
|| (counters.minutes === target[MINUTES_POSITION] && (counters.seconds < target[SECONDS_POSITION]
|| (counters.seconds === target[SECONDS_POSITION] && (counters.secondTenths < target[SECOND_TENTHS_POSITION]
|| counters.secondTenths === target[SECOND_TENTHS_POSITION] ))))));
}

function isTargetAchieved() {
Expand Down

0 comments on commit 8464aa0

Please sign in to comment.