Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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().
When I tried using this, I get the following error
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 reference error has been fixed and I've urgently published
I will consider the idea using an id to control timers with your idea suggested before.
Thank you very much for reporting the issue.