# Can i force my program to check the "if" section while it's running the "else" segment?

**URL:** <https://forum.makecode.com/t/can-i-force-my-program-to-check-the-if-section-while-its-running-the-else-segment/14097>\
**Category:** micro:bit\
**Created:** [June 14, 2022, 5:14pm UTC](https://forum.makecode.com/t/can-i-force-my-program-to-check-the-if-section-while-its-running-the-else-segment/14097 "2022-06-14T17:14:17Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [July 8, 2022, 8:07pm UTC](https://forum.makecode.com/t/can-i-force-my-program-to-check-the-if-section-while-its-running-the-else-segment/14097/7 "2022-07-08T20:07:45Z")

</div>

I’ve made a first pass at a port of the `arcade-timers` extension to the micro:bit environment. You get the same functionality as in the MakeCode Arcade version in Blocks. As a bonus, I have exported the support functions so that you can use `timer.clearInterval()`, `timer.clearTimeout()`, `timer.setInterval()`, and `timer.setTimeout()` in JavaScript and Python just as their MakeCode Arcade counterparts.

Install the extension with this URL:

[https://github.com/robo-technical-group/pxt-microbit-timers](https://github.com/robo-technical-group/pxt-microbit-timers)

> **[GitHub - robo-technical-group/pxt-microbit-timers: Port of pxt-arcade-timers...](https://github.com/robo-technical-group/pxt-microbit-timers)**
>
> Port of pxt-arcade-timers to the micro:bit platform - GitHub - robo-technical-group/pxt-microbit-timers: Port of pxt-arcade-timers to the micro:bit platform

**Devs** : Feel free to do a code review and submit pull requests. If you’d like me to transfer ownership of the repo so that you can use this to build an official extension, then just let me know.

---

_[View the full topic](https://forum.makecode.com/t/can-i-force-my-program-to-check-the-if-section-while-its-running-the-else-segment/14097)._
