Loop using setTimeout instead of setInterval
This commit is contained in:
parent
0d95143468
commit
9318fd6d02
@ -158,9 +158,16 @@ function updateDashboard(queues) {
|
||||
}
|
||||
}
|
||||
|
||||
window.setInterval(function(){
|
||||
function loop(timeout, func) {
|
||||
window.setTimeout(function(){
|
||||
func();
|
||||
loop(timeout, func);
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
loop(1000, function(){
|
||||
loadStatus(updateDashboard);
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user