Hey guys, I finished my Pomodoro Clock. The main timer is incrementable/decrementable in periods of 1 minute to a max of 50 and the break timer in periods of 5 minutes to a max of 10. When you hit start, the start button should be disabled until stop, reset or the increment/decrement buttons are hit. The timers count down really fast right now for testing purposes.
I found a bug that I can’t seem to solve, when the break timer ticks down to 0 it runs the resetTimer() function which runs the getBreakMinutesSeconds(time) function which passes in the initial break timer amount (by default 300 seconds (5:00) but the display always shows an extra 0 at the end (5:000) if it’s an even minute number (ex: 1:00, 2:00, 5:00, 10:00). This doesn’t happen when the number doesn’t end in 00.
Comments appreciated, including how to possibly refactor the functions. I know it’s ugly code right now as I basically reused all the same code in duplicate functions for the main timer and the break timer. Thanks!