i am developing an app with jQuery mobile and cordova and i have a countdown in my app(which is a plugin added to my project), and i want when this timer reaches 10 seconds, a specific function be called.the first option is my countdown be checked every second, but it is impossible do to some performance issues and that's not really reasonable because my countdown may show 5 days. another option is to use setTimeout, but i think that would decrease performance. wont it?
assumesetTimeout(function{//function call}, 14400000)
just for 4 hours let alone days.
if it does decrease the performance, what other options do i have? is there anything like crone in node.js for javascript or jQuery, so that we can specify a time and date for function to be called?
i mean that would be fine if i can set time and date for function call for example on 2016-09-01 15:10:40
tnx