mirror of https://github.com/espruino/BangleApps
stopwatch: Ensure seconds counter is in sync with subseconds (fix #341)
parent
a389ed5dbe
commit
80ff424ac9
|
@ -452,7 +452,7 @@
|
||||||
{ "id": "swatch",
|
{ "id": "swatch",
|
||||||
"name": "Stopwatch",
|
"name": "Stopwatch",
|
||||||
"icon": "stopwatch.png",
|
"icon": "stopwatch.png",
|
||||||
"version":"0.06",
|
"version":"0.07",
|
||||||
"interface": "interface.html",
|
"interface": "interface.html",
|
||||||
"description": "Simple stopwatch with Lap Time logging to a JSON file",
|
"description": "Simple stopwatch with Lap Time logging to a JSON file",
|
||||||
"tags": "health",
|
"tags": "health",
|
||||||
|
|
|
@ -6,3 +6,4 @@
|
||||||
0.04: Changed save file filename, add interface.html to allow laps to be loaded
|
0.04: Changed save file filename, add interface.html to allow laps to be loaded
|
||||||
0.05: Added widgets
|
0.05: Added widgets
|
||||||
0.06: Added total running time, moved lap time to smaller display, total run time now appends as first entry in array, saving now saves last lap as well
|
0.06: Added total running time, moved lap time to smaller display, total run time now appends as first entry in array, saving now saves last lap as well
|
||||||
|
0.07: Ensure seconds counter is in sync with subseconds (fix #341)
|
||||||
|
|
|
@ -94,7 +94,8 @@ setWatch(function() { // Start/stop
|
||||||
displayInterval = setInterval(function() {
|
displayInterval = setInterval(function() {
|
||||||
var last = tCurrent;
|
var last = tCurrent;
|
||||||
if (started) tCurrent = Date.now();
|
if (started) tCurrent = Date.now();
|
||||||
if (Math.floor(last/1000)!=Math.floor(tCurrent/1000))
|
if (Math.floor((last-tStart)/1000)!=Math.floor((tCurrent-tStart)/1000) ||
|
||||||
|
Math.floor((last-tTotal)/1000)!=Math.floor((tCurrent-tTotal)/1000))
|
||||||
drawsecs();
|
drawsecs();
|
||||||
else
|
else
|
||||||
drawms();
|
drawms();
|
||||||
|
|
Loading…
Reference in New Issue