Check if timer is running
-
I have this timer running.
Is there a method to check isTimerRuning ?var myTimer = Engine.createTimerObject(); myTimer.setTimerCallback(function () { Console.print("Timer is running....") }); masterTimer.startTimer(1000);
-
You could add something like:
var myTimer = Engine.createTimerObject(); var isTimerRunning = 0; myTimer.setTimerCallback(function () { Console.print("Timer is running....") }); masterTimer.startTimer(1000); isTimerRunning = 1;
And whenever you call stopTimer, just set it to 0.
Now you can reference it with
if (isTimerRunning)
-
-
Yeah, that's trivial to add, there's already a function like this in the JUCE class.