# Tutorial: How I make timers that show remaining execution time

**URL:** <https://community.openhab.org/t/tutorial-how-i-make-timers-that-show-remaining-execution-time/104620>\
**Category:** Tutorials & Examples\
**Tags:** timer, rules\
**Created:** [September 5, 2020, 5:13pm UTC](https://community.openhab.org/t/tutorial-how-i-make-timers-that-show-remaining-execution-time/104620 "2020-09-05T17:13:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [September 7, 2020, 4:53pm UTC](https://community.openhab.org/t/tutorial-how-i-make-timers-that-show-remaining-execution-time/104620/2 "2020-09-07T16:53:04Z")

</div>

rossko57 had a design pattern that does this as well using expire. [Design Pattern : Expire Binding based Countdown timer](https://community.openhab.org/t/design-pattern-expire-binding-based-countdown-timer/49225) There is a link to a Python version that can be just dropped in and used.

I didn’t do a thorough analysis of the code but everything looks good except for what I mention below.

According to github, it looks like the maintainers are working on an expire replacement that will be compatible with the 1.x binding.

Don’t use Thread:sleep. Instead use ‘receivedCommand’. Look in the rules docs implicit variable section for many other helper variables that are available.

Since the Items are Number Items, use `triggeringItem.state as Number` rather than converting the Number to a String only to parse it back to a Number.

---

_[View the full topic](https://community.openhab.org/t/tutorial-how-i-make-timers-that-show-remaining-execution-time/104620)._
