Draw the circles a little bit delayed so we decrease the blocking time

pull/1522/head
Marco H 2022-02-22 15:16:40 +01:00
parent f6a2a03448
commit 9977460d1f
1 changed files with 13 additions and 4 deletions

View File

@ -138,10 +138,19 @@ function draw() {
g.drawString(locale.date(new Date()), w / 2, h2);
g.drawString(locale.dow(new Date()), w / 2, h2 + dowOffset);
// draw the circles a little bit delayed so we decrease the blocking time
setTimeout(function() {
drawCircle(1);
}, 1);
setTimeout(function() {
drawCircle(2);
}, 1);
setTimeout(function() {
drawCircle(3);
}, 1);
setTimeout(function() {
if (circleCount >= 4) drawCircle(4);
}, 1);
}
function drawCircle(index) {