I am working with FlotCharts, more specific with the real time one, And I tried to stop it completely I mean "one real pause" , but I was only able do put the "update time"up to 2000ms... Please, tell me that is possible to real stop it...Google was not that helpfull Thanks! |
var timeoutID;
var UPDATE_INTERVAL = 2000;
// Click event handler for <button id="cancel-button">Cancel Timer</button>
$("#cancel-button").on("click", function() {
window.clearTimeout(timeoutID);
}
function update() {
// Do something here
timeoutID = window.setTimeout(update, UPDATE_INTERVAL);
}
timeoutID = window.setTimeout(update, UPDATE_INTERVAL);