I wrote this way (My Timer background) and it works only when I leave the app but when it does not resume within the timer .. and when it reaches 0 continues and goes below 0. How can I make it appear that is written in this way? 15: 00 instead of 900.00? And that when the timer gets zero it stops and can you connect the classic timer with the backgroun timer?
--- Classic timer ---
{System.every tick: set text to floor floor (Timer / 60% 60) & ":" & floor (Timer% 60)
System.Timer> 0: System subbtract dt from Timer
System.Timer <0: system set Timer to 0
}
--- My Timer background ---
{System: on start layout: local storage: check item "mytimer exist;
LocalStorage: on item "mytimer" exist: localStorage: get item "mytimer";
LocalStorage: on item "mytimer" get: text: set text to (15 * 60) - ((Date.UnixTimestamp-LocalStorage.ItemValue) * 0.001);
Button: on clicked: LocalStorage: Set item: Setitem "mytimer" to Date.UnixTimestamp;
LocalStorage: On item "mytimer" set: text: Set text to "Timer set".