Can I make a countdown using seconds since 1970?

10:00
10:59
10:58
10:57

I want to make a countdown from 10 minutes and stop at 00:00 as above.

1 Like

Thanks for your question @mom7667yafy - finally got around to writing a tutorial for this.

You can find this on the Timer screen of the Tempus sample app:

1 Like

Thank you.

I want to make sure that the time passed when closing the app is applied even when the app is closed.
The information you introduced is not really a function that can be used because the time stops immediately when you close the app and the time passes when you close it.

So the information you introduced doesn’t implement what I want.

1 Like

but that is a way too different question :sweat_smile: to do that maybe you can use the clock component to save every second the

“Current Countdown” and the “Day”, “Hour” and “minute” of the current users Date&Time, so if the users closed the app the clock obiusly will stop saving so when the users re-opens the app again you can retrieve the last time the users stored on his countdown and continue the countdown

is this the idea?

1 Like

@mom7667yafy I think. If you do the following it
may get you on track. So basically you get 1 time and store it. Then you just see how much time as passed since you stored the first time Measure and delete this from 10 minutes.

on button click
set var A = seconds since 1970

loop
set var B = seconds since 1970-var A
set text of label 1 using join text blocks with “round (600-varB)/60 with 0 decimal places”, “:”, “(remainder of 600-varB/60)
wait 1 sec
if round (600-varB)/60 with 0 decimal places”, “:”, "(remainder of 600-varB/60) = 0 break out of loop
loop

does that make sense.

1 Like

please can you provide screenshots?
It makes sense but as a novice life’s hard

1 Like