I created a countdown but i have a problem with seconds, because sometimes it skips one second, for example it goes from 50 to 48 directly.
I used the debugger to understand why it was doing like that and i found that the delay function isn’t perfect, but instead, every second it accumulates some tenths and because of that after some seconds it skips one.
This is the flow function
And this is the formula i use to calculate the seconds
INTEGER(DATETIME_DIFFERENCE(“2021-09-09T14:00:00+02:00”, appVars.timeNow) % (1000 * 60) / 1000)
How can i get it to work properly? (I tried to decrease the delay, but then the counter is not accurate either)
Bonus question: Why if i connect to page focused the counter work properly, but if i connect to page mounted it shows for hours and minutes the preview value?