# Timer using a boolean OPC tag

**URL:** <https://forum.inductiveautomation.com/t/timer-using-a-boolean-opc-tag/44132>\
**Category:** Ignition\
**Created:** [March 4, 2021, 11:38pm UTC](https://forum.inductiveautomation.com/t/timer-using-a-boolean-opc-tag/44132 "2021-03-04T23:38:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonio.sanchez](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@antonio.sanchez](https://forum.inductiveautomation.com/u/antonio.sanchez)\
**Post date:** [March 4, 2021, 11:38pm UTC](https://forum.inductiveautomation.com/t/timer-using-a-boolean-opc-tag/44132/1 "2021-03-04T23:38:41Z")

</div>

Hello I need to do a timer, using a boolean OPC tag so when it turns on it starts counting the time it lasts on

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 5, 2021, 6:02am UTC](https://forum.inductiveautomation.com/t/timer-using-a-boolean-opc-tag/44132/2 "2021-03-05T06:02:03Z")

</div>

You can just capture the timestamp of when the tag value changed with a tag change script, and compare that to now
