How to set a TinyDB that stores values for 24 hours max?
How do you know if a time is up?
By clicking on a button. I dont know how to the clock value for 24 hours after clicking
Don’t you think that maybe you need the countdown timer?
yes, thats what I need
I’m not sure, but, you said you did.
May be try like this…
Whenever screen initialise convert current date and time into milliseconds.
If the user pressed save button save the value along with current milliseconds. Or milliseconds into tinydb1 and value to tinyDB 2
And every particular interval let the clock to find the diff between saved milliseconds with current date and time milliseconds if tnydb contains any tag. If not do not find the diff
If the difference is more than 86400000 mean time is crossed 24hr so you can clear the tag/ TINYDB 2
Can you submit an example?
You have been given an example, it is up to you to convert it to blocks.