diff --git a/12/liveplayer.js b/12/liveplayer.js index 395d3a5..5b5a2cd 100644 --- a/12/liveplayer.js +++ b/12/liveplayer.js @@ -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); } \ No newline at end of file