Small count-up timer extension

Hey all! I made an extremely lightweight extension for my own convenience which adds a timer that counts up. Figured I’d link it here in case it’s useful: https://github.com/shakao/pxt-countup

It adds the following (hopefully mostly self-explanatory!) blocks to the Info category:

image

Demo:

11 Likes

niiiiiiiiiice!

1 Like

Is there an unpause timer? bx here is a pause but no unpause

4 Likes

I see that we can use this up-timer for our space launch stories in Arcade regarding our Fantasy Starship Factory. We can use countdown to launch and then switch over to count up. We will then be able to correlate fuel consumption as a percent remaining against time and altitude. Thanx, @shakao

2 Likes

@frank_schmidt Haha, glad to hear it’ll be useful!

@DahbixLP Oh, you can call “start countup” again to unpause it! Hmm, maybe I should adjust the blocks, I was trying to keep it to as few blocks as possible but I can see how this is a bit confusing.

3 Likes

This is awesome! I have a suggestion, when you go over a minute long or something like that, if you display the number of seconds elapsed, you should make it minutes elapsed, and change the block name to ‘time elapsed’ but that’s just a suggestion as this extension is great as it is!

1 Like

Oh yeah, good note! I guess it could be a block that has “time elapsed in [dropdown]” and then you could choose whether to get the time in milliseconds, seconds, or minutes. I’ll see if I can do some adjustments!

3 Likes