How can I perform three functions within the same setInterval, and for one the time to update should be different.
I've tried the following:
function sleep(ms) {
return new Promise(resolve => setInterval(resolve, ms));
}
async function update() {
for($i=0;$i<300;$i++){ // a cada 300x (5min) faz um refresh
atualizaLeilao();
atualizaLeilaoCancelado();
updateClock();
await sleep(1000);
}
location.reload();
}
$(document).ready(function () {
update();
});
I need the atualizaLeilaoCancelado();
function to refresh every 5 minutes, not every second.