Update app.js

master
xxDUxx 2022-04-28 12:11:11 +02:00 committed by GitHub
parent a9ac37fe17
commit ae691eda8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -7,6 +7,13 @@ if (settings.fontIndex==undefined) {
require('Storage').writeJSON("myapp.json", settings);
}
function queueDraw() {
setTimeout(function() {
draw();
queueDraw();
}, 60000 - (Date.now() % 60000));
}
function draw() {
var date = new Date();
// Draw day of the week
@ -24,7 +31,5 @@ Bangle.setUI("clock");
g.clear();
Bangle.loadWidgets();
Bangle.drawWidgets();
queueDraw();
draw();
setTimeout(function() {
setInterval(draw,60000);
}, 60000 - Date.now() % 60000);