# How to create a timer tag?

**URL:** <https://forum.inductiveautomation.com/t/how-to-create-a-timer-tag/19358>\
**Category:** Ignition\
**Created:** [August 22, 2018, 12:11pm UTC](https://forum.inductiveautomation.com/t/how-to-create-a-timer-tag/19358 "2018-08-22T12:11:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blogsdon](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@blogsdon](https://forum.inductiveautomation.com/u/blogsdon)\
**Post date:** [August 22, 2018, 12:11pm UTC](https://forum.inductiveautomation.com/t/how-to-create-a-timer-tag/19358/1 "2018-08-22T12:11:49Z")

</div>

I am new to Python scripting as well as Ignition.  
I am trying to create tag that is an integer value timer with an expression that starts the timer when another tag equals “1” and reset it each time a separate tag equals “1” and then a tag event script to write a “4” to the original tag that started the timer. I understand the tag event script for doing this but I do not understand how to write the expression script to turn this integer timer on/off.

---

<div class="post-metadata">

**Author:** ![dano38291](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@dano38291](https://forum.inductiveautomation.com/u/dano38291)\
**Post date:** [August 22, 2018, 12:35pm UTC](https://forum.inductiveautomation.com/t/how-to-create-a-timer-tag/19358/2 "2018-08-22T12:35:30Z")

</div>

I took some of these suggestions for doing timer stuff in Ignition. Main idea is get system time and then use the secondsbetween expression.

It took me a while to get up to speed on python, you will have to rely on Python docs and outside tutorials as well.

> [@Creating a Stopwatch inside Ignition](http://forum.inductiveautomation.com/t/creating-a-stopwatch-inside-ignition/18545):
>
> Hello So a Timer component cannot be used as Stopwatch since it drifts. I have Ignition collecting data from a Spraying Process and collecting data off a few scales. I don’t want my users to use a Physical Stop watch. I I guess I can look into hour meter functionality of Transaction Groups? Maybe I could do some scripting where I store a Started Timestamp then Every second look at Current Timestamp minus the Started Timestamp.(this shouldn’t cause issues?)

Also ignition Manual and Inductive U videos are super helpful.
