You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking for a countdown timer with pause for a project I'm doing. Unfortunately, the countdown timer example doesn't work as written. The call to ResumeTimer in every loop resets the timer so it can never advance. This adjustment seems to work. void ResumeTimer() // You can resume the timer if you ever stop it. { if (Paused) { Paused = false; time = _InternalClock(); } }
Also, I'm not sure why there's an if (Paused) inside the if (!Stop && !Paused) condition. It should never make it there, or is there something I'm missing?
The text was updated successfully, but these errors were encountered:
On Aug 14, 2018, at 12:23 AM, goofee76 ***@***.***> wrote:
I was looking for a countdown timer with pause for a project I'm doing. Unfortunately, the countdown timer example doesn't work as written. The call to ResumeTimer in every loop resets the timer so it can never advance. This adjustment seems to work.
void ResumeTimer() // You can resume the timer if you ever stop it. { if (Paused) { Paused = false; time = _InternalClock(); } }
Also, I'm not sure why there's an if (Paused) inside the if (!Stop && !Paused) condition. It should never make it there, or is there something I'm missing?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I was looking for a countdown timer with pause for a project I'm doing. Unfortunately, the countdown timer example doesn't work as written. The call to ResumeTimer in every loop resets the timer so it can never advance. This adjustment seems to work.
void ResumeTimer() // You can resume the timer if you ever stop it. { if (Paused) { Paused = false; time = _InternalClock(); } }
Also, I'm not sure why there's an
if (Paused)
inside theif (!Stop && !Paused)
condition. It should never make it there, or is there something I'm missing?The text was updated successfully, but these errors were encountered: