mirror of https://github.com/espruino/BangleApps
banglerun fix timer
Missing modulo 60 caused the minutes not to reset when hitting 60pull/486/head
parent
53061f27d3
commit
9da68b6efd
|
@ -1433,7 +1433,7 @@
|
|||
"name": "BangleRun",
|
||||
"shortName": "BangleRun",
|
||||
"icon": "banglerun.png",
|
||||
"version": "0.01",
|
||||
"version": "0.02",
|
||||
"description": "An app for running sessions.",
|
||||
"tags": "run,running,fitness,outdoors",
|
||||
"allow_emulator": false,
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
0.01: First release
|
||||
0.02: Bugfix time: Reset minutes to 0 when hitting 60
|
||||
|
|
|
@ -184,7 +184,7 @@ function formatDistance(m) {
|
|||
|
||||
function formatTime(s) {
|
||||
const hrs = Math.floor(s / 3600);
|
||||
const min = Math.floor(s / 60);
|
||||
const min = Math.floor(s / 60) % 60;
|
||||
const sec = Math.floor(s % 60);
|
||||
return (hrs ? hrs + ':' : '') + ('0' + min).substr(-2) + `:` + ('0' + sec).substr(-2);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue