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 would like to terminate or cancel an instant of an onTime so that I could programmically restart it using a different setting. Therefore, I tried using ot.cancel(); I assumed that is what this is for but was unsure.
As a test, I was using the ontime module to trigger every minute and when the minute >= ## then I called ot.cancel().
if(myMin >= 50) ot.cancel();
When I tried using this, I get the following error
/home/web/node_modules/ontime/index.js:209
cancelTimeout(then.timer)
ReferenceError: cancelTimeout is not defined
Ideally, I would like to kill an instance of onTime using the id and use it anywhere in the code with just ot.cancel(id);
Thanks for your help.
The text was updated successfully, but these errors were encountered:
The reference error has been fixed and I've urgently published v0.0.6 with the fix.
I should have more exhaustively tested what might happen with single set to false.
I will consider the idea using an id to control timers with your idea suggested before.
I would like to terminate or cancel an instant of an onTime so that I could programmically restart it using a different setting. Therefore, I tried using ot.cancel(); I assumed that is what this is for but was unsure.
As a test, I was using the ontime module to trigger every minute and when the minute >= ## then I called ot.cancel().
if(myMin >= 50) ot.cancel();
When I tried using this, I get the following error
/home/web/node_modules/ontime/index.js:209
cancelTimeout(then.timer)
ReferenceError: cancelTimeout is not defined
Ideally, I would like to kill an instance of onTime using the id and use it anywhere in the code with just ot.cancel(id);
Thanks for your help.
The text was updated successfully, but these errors were encountered: