Making a permanent stopwatch

Hello, I want to make a stopwatch for seconds, minutes and hours that even if we go out of the program, a notification will appear and not disappear and show the current time of the chromemeter and if we go back to the app, I don't want it to be more chrome than before but show the current time until it resets.

Such a program

Hi there,

Please don't "bump" into your posts - that will result in your topic being further down in the list. Please patiently wait. Thanks.

And to make it work in the background, use the Background Tasks extension.

Thanks, but this is just to create a stopwatch
But I want Chrometer to start even when the app is closed

Yes, did you read my post?

Yes, I saw it and tested it, it was right on the notification, but when I went back to the chrome screen, it was zero

I want to test this in the list, that's why I said I want it to not be removed when the user adds something to the list when exiting the app.

See my solution (post 20) for a stop watch:

To make it work when the User leaves the App and returns later, store the current date in milliseconds in a TinyDb, along with the Hrs, Mins, Secs values. Next time the App is opened, subtract the stored milliseconds from the present milliseconds to obtain the time interval the App was closed for. Convert that time interval into Hrs, Mins,Secs and add to the stored values of the same. Add the Hrs, Mins, Secs to the global values of the same. Display these up-to-date values and leave the App to do the rest.

1 Like

Yes, of course this works as long as the time/duration is not needed in the background.

Simple example: You want to use the stopwatch or timer to remind you after 20 minutes that the potatoes are done cooking and need to be off the stove.

In this case (which will be the norm) it doesn't work, of course, because then the timer has to run also in the background.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.