Creating a Chronometer

Hello Everyone!
I am new in this community and I am starting to create my apps with MIT app inventor,
This is my very first app and I wanted to create multiple (like 3 or 4) Chronometers that measured how much time I spent on a certain activity. There will be 3 buttons (Start, Stop and Reset) and a label where to put a name for each Chronometer.
I am stuck and I don’t know how to continue, if anyone has any idea if you can please give me an advice that will help me.
Thank you!

1 Like

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

Hello Alessandro

First concern is the period of time to be measured, as an App Inventor App must be on for the duration.

If you really need the precision of a Chronometer, App Inventor’s current timer ability may fall short, but I will assign your post to my colleague Anke as she has developed an extension to address this.

2 Likes

The clock on AI2 and its clones loses almost 1 second per minute. It has very little in common with a chronometer. My extension doesn’t lose a single millisecond. @PizzaGuy07
I updated my test APK:

But I still need some time to finish the extension.

Thank you I will surely

1 Like

1 Like

Sorry I am Italian and I should have changed some of the words to english,
If you can’t see it let me know and I will take a better photo of it.
Thank you
Alessandro

1 Like

See also these approaches:

https://groups.google.com/forum/#!category-topic/app-inventor-developers-library/6eknWf2cJN0

So where is your problem?

Also, this is the basis of the stopwatch by Scott Ferguson, keeps time to 1/10th second

Clock is set to nothing:

image

It may be possible to use just the one clock for four counters…

2 Likes

See this sample exercise routine app for three simultaneous timers on one Clock …
https://groups.google.com/forum/#!msg/mitappinventortest/BOj2-ThEe3s/VlmXdcVOAgAJ

1 Like

Nice Idea, I might try this one!!
Thank you for your inspiration

1 Like

Thank you It will be very useful!

1 Like

My problem is in the minutes part where it doesn’t give the seconds after the whole min number it has be given (for example if there are 75 sec, it gives only 1 min without counting the 15 sec that are left out)
Thank you for the suggestions that you give me!
Alessandro

1 Like

Minutes and seconds are standard countdown timer parts.
Here is one sample:
https://groups.google.com/forum/#!msg/mitappinventortest/QBw5qNHEsxc/EmdKoQLMDwAJ

The basic idea is to start from total milliseconds to boom,
then chop off years, months, days, hours, minutes, seconds from each successive remainder working your way down from large to small.

2 Likes

Thank you it worked now that you helped solving my problem I will continue with careful.
Alessandro

Hello again, I faced another problem but this time is just an aesthetic one and not a structural one.
For each chronometer I would really like to find the format of the clock with 0.00.00 but instead when I make the time start I just see 0.0.0 and the seconds keep going. How do I solve it?
Thank you very much!

1 Like

It’s nothing too complicated I just can’t find a way to change the format of the clock that’s it. If you have an idea that might solve my problem I will surely consider it.
Thank you
Alessandro

1 Like

Try this:

Maybe I'll post a little extension to simplify this. I let you know ...

1 Like

It would look like this:

1 Like

Thank you very much it’s very helpful :+1:

1 Like