[G4P] Read out GTimer
in
Contributed Library Questions
•
4 months ago
Hey!
Got another Question regarding the library:
I made a GTimer like that, which works just fine:
- void setup() {
- timerInt = new GTimer(this, this, "timerInt_Action", 1000);
- int sec = Integer.valueOf(secInt.getText());
- int min = Integer.valueOf(minInt.getText());
- int interval = (min * 60 + sec) * 1000;
- timerInt.setInterval(interval);
- timerInt.start();
- }
- void timerInt_Action(GTimer source) {
- println("Timer down");
- }
Now, my question is, is there a way to read out the current Countdown?
For example, if i made another Timer which ticks every second and prints me the current state of the above timer?
Tried that:
- void timerCounterdown_Action(GTimer source) {
- println(Integer.valueOf(timerInt);
- }
Didn't work, of course.
Is there any way to read it out? Hope i made myself clear somehow.
1