Hi
How can I create a timer (display) in a Retool mobile app, since the control is not (yet?) available for mobile?
I would like to display the hh:mm:ss since a screen has been opened.
Thanks!
Gianluca
Hey @Gianluca! We do have a feature request for the timer component in mobile apps, so we will update you here when we have any additional information on that for you. In the interim, I did write up a couple of JS queries to calculate this for you. It's probably not perfect, but seemed to work pretty well.
Get the current time when the app is opened:
Ensuring that this query runs on app start:

Calculate the difference (as often as you want):
Here I'm running it every second (after a 1 second delay). You can alter these times based on the absolute precision that you want to show.
Then display that information in a text component in the app:
Let me know if you have any questions!