Upcoming extension: countdown / up timer - date / time format - in real time

I’m going to create a new extension that counts down or up seconds (or ms), but also displays the duration / time in the date format (eg: HH:mm:ss).

The special thing is that the extension does not use a clock and / or does not work with the java countdownTimer, but catches and displays the time in real time. In this way, the countdown / count up does not lose a single millisecond regardless of how long the period is.

The extension (in which I was supported by @Red_Panda with regard to some special java questions) will be extended by some functions yet, but here is a pre-release version / APK for testing :

And also the DeepHost countdown extension (which incorrectly counts down 2 seconds at the beginning and does not use a clock component, but uses Java countdownTimer) loses more than 1 second in a 10-minute countdown.

I have regularly found in my, but also in other apps, that the specified (calculated) runtimes do not correspond to the displayed ones. The deviations are considerable with longer durations. In short, the clock component may still be suitable as an egg timer for cooking eggs. :wink:

Note : If you have any suggestions, ideas or issue with that, let me know.

I updated the APK (at clock countdown from the first “start” button there was one zero to much).

6 Likes

Sounds great Anke - much needed for all sorts of Projects.

1 Like

I updated the APK link.
(at clock countdown from the first “start” button there was one zero to much)

Have you seen this: Scott Ferguson’s Stopwatch

Keeps time very nicely, might cut down your code ?

Of course I know this approach and also others.

First, it's just a stopwatch. Secondly, it is quite cumbersome, time consuming and annoying to install these very extensive blocks in your own app every time. Third, the app only runs in the foreground. Fourth, this is not about the date / time format HH:mm:ss (hours are counted up to 99). Fifth: "When testing this project during development, the emulator will not be able to keep up so use an attached device instead."

The accuracy of the approach is ok (100ms), but my extension works millisecond-precise and I and certainly many others would like a simple, precise and also working in the background solution that counts up and down and also the correct date / time format used.

Well that is me put in my place, then :slight_smile:

Hi, thank for the information, however, i don´t know how to apply the code in my app, i know, its possible that you are busy, but if you can help me i than you, the code of the sprite is


Using the timer the sprite reach the edge in different times in diferentes smartphones yet...
will be very interesting have a code that dont use the timer

Thanks for the collaboration that you can give me..

Hi Anke, did you release the countdown extension in the meantime?
Would be very helpful since the build in clock is really unusable (depending on how much code is run I get up to 2:30 min deviation (slower) for a 10 minute duration...) and this seems to get worse the longer you run the app...my last workout was 1:37h instead of the planned 30 min :wink:
Tobi

It sounds like you are not comparing Clock1.SystemTime to a saved start milliseconds value to get current elapsed time.

This frees you from cumulative error.

If you examine the Scott Ferguson sample earlier in this thread, you will see that idea at its core.

Hi Abraham, yes this should work for my needs - Thanks for your help!

Are you going to release this Extension Anke?

Ohh, I totally forgot about that. :upside_down_face:
I think I postponed it because of the Doze mode issues.