CountUpDownTimer icon indicating copy to clipboard operation
CountUpDownTimer copied to clipboard

Is the timer running?

Open phillip-toone opened this issue 6 years ago • 3 comments

Is there a way to query the state of the timer to see if it is running. I use a global boolean variable called isTimerRunning that I set to true or false every time I pause or resume the timer. It seems to me that there would be a method I can use to request the state of the timer. I've looked but haven't been able to find anything in the examples codes or in the keywords.txt file.

phillip-toone avatar Mar 15 '19 21:03 phillip-toone

Not right now as I put these flags under private. boolean Reset, Stop, Paused;

You can change them to public if you want or just add a new function.

  • Andrew

Sent from my iPhone

On Mar 15, 2019, at 5:12 PM, Phillip Toone [email protected] wrote:

Is there a way to query the state of the timer to see if it is running. I use a global boolean variable called isTimerRunning that I set to true or false every time I pause or resume the timer. It seems to me that there would be a method I can use to request the state of the timer. I've looked but haven't been able to find anything in the examples codes or in the keywords.txt file.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

AndrewMascolo avatar Mar 15 '19 21:03 AndrewMascolo

The following function give me what I was looking for:

  boolean isTimerRunning() // output true if timer is running.
  {
    if(Paused)
      return false;
    else
      return true;
  }

I would like to add this code to this public library but I am not sure the best way to do this. Should I fork the project, make the changes, and push the changes back into master. Sorry if this is a stupid question but I am a novice with github and would like to learn. Thanks.

phillip-toone avatar Mar 18 '19 18:03 phillip-toone

I’ll add it.

  • Andrew

Sent from my iPhone

On Mar 18, 2019, at 2:38 PM, Phillip Toone [email protected] wrote:

The following function give me what I was looking for:

boolean isTimerRunning() // output true if timer is running. { if(Paused) return false; else return true; } I would like to add this code to this public library but I am not sure the best way to do this. Should I fork the project, make the changes, and push the changes back into master. Sorry if this is a stupid question but I am a novice with github and would like to learn. Thanks.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

AndrewMascolo avatar Mar 18 '19 18:03 AndrewMascolo