From 64bdddc8f1b7bb5d638f78ce6250f49e5f4e95d7 Mon Sep 17 00:00:00 2001 From: Marco Heiming Date: Tue, 8 Feb 2022 16:51:49 +0100 Subject: [PATCH] Let us call draw at beginning of minute --- apps/circlesclock/app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/circlesclock/app.js b/apps/circlesclock/app.js index 157698865..903c7bdb2 100644 --- a/apps/circlesclock/app.js +++ b/apps/circlesclock/app.js @@ -827,5 +827,10 @@ if (isCircleEnabled("hr")) { Bangle.setUI("clock"); Bangle.loadWidgets(); +// schedule a draw for the next minute +setTimeout(function() { + // draw every 60 seconds + setInterval(draw,60000); +}, 60000 - (Date.now() % 60000)); + draw(); -setInterval(draw, 60000);