Microsoft MakeCode

Timers extension: after X, debounce, throttle, and in-background

Hello world,

I create a new “Timers” extension:
Early beta.




“After X do” / aka setTimeout:

“Separately do” / aka run in background thread:

“after Y settled for X do” / aka debounce:

“for Y at most once every X do” / aka throttle:


Oooh. These look nice! I’m curious if there are many implementation differences between your setTimeout equivalent and @peli’s recently posted setTimeout-sounding block:

My APIs are integrated into the arcade runtime, eg they will run at the same priority as the “on game update” handler.

Ah. I should probably learn more about this.

Is this documentation still mostly relevant? … the version number mentioned in the beginning looks to be a bit behind the current release.

Yes it’s pretty good. This part has not changed much.

1 Like