Changed timer equations

Inserted additional “counter = millis()” and changed the timer
equations to try to get more accurate countdowns.