1
0
Fork 0

Merge pull request #1934 from deirdreobyrne/bigdclock-v0.04

bug fix (again!): confused setTimeout with setInterval
master
Gordon Williams 2022-06-08 08:18:39 +01:00 committed by GitHub
commit 50ed1b766b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,4 @@
0.01: Initial version 0.01: Initial version
0.02: setTimeout bug fix; no leading zero on date; lightmode; 12 hour format; cleanup 0.02: setTimeout bug fix; no leading zero on date; lightmode; 12 hour format; cleanup
0.03: Internationalisation; bug fix - battery icon responds promptly to charging state 0.03: Internationalisation; bug fix - battery icon responds promptly to charging state
0.04: bug fix

View File

@ -16,6 +16,7 @@ var drawTimeout;
function queueDraw() { function queueDraw() {
if (drawTimeout) clearTimeout(drawTimeout); if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = setTimeout(function () { drawTimeout = setTimeout(function () {
drawTimeout = undefined;
draw(); draw();
}, 60300 - (Date.now() % 60000)); // We aim for 300ms into the next minute to ensure we make it! }, 60300 - (Date.now() % 60000)); // We aim for 300ms into the next minute to ensure we make it!
} }

View File

@ -1,7 +1,7 @@
{ "id": "bigdclock", { "id": "bigdclock",
"name": "Big digit clock containing just the essentials", "name": "Big digit clock containing just the essentials",
"shortName":"Big digit clk", "shortName":"Big digit clk",
"version":"0.03", "version":"0.04",
"description": "A clock containing just the essentials, made as easy to read as possible for those of us that need glasses. It contains the time, the day-of-week, the day-of-month, and the current battery state-of-charge.", "description": "A clock containing just the essentials, made as easy to read as possible for those of us that need glasses. It contains the time, the day-of-week, the day-of-month, and the current battery state-of-charge.",
"icon": "bigdclock.png", "icon": "bigdclock.png",
"type": "clock", "type": "clock",