running an action for x secs js code example
Example: js do every x seconds
window.setInterval(function() {
// do stuff
}, 1000); // 1000 milliseconds (1 second)
window.setInterval(function() {
// do stuff
}, 1000); // 1000 milliseconds (1 second)