Update '12/liveplayer.js'

master
murtaugh 5 years ago
parent a1a012a1e5
commit be70589f57

@ -3,6 +3,7 @@ function liveplayer (elt) {
DELAY_TIME_SECS = 5;
async function poll () {
console.log("poll");
var rows = await (await fetch("/cgi-bin/radioimplicancies.cgi")).json();
// console.log("rows", rows);
if (rows) {
@ -25,8 +26,11 @@ function liveplayer (elt) {
}
}, DELAY_TIME_SECS*1000);
}
window.setTimeout(poll, 5000);
} else {
window.setTimeout(poll, 10000);
}
}
window.setInterval(poll, 5000);
window.setTimeout(poll, 0);
}
Loading…
Cancel
Save