Time variabile into a Template

Hi.

Is there any way to insert a time variable into a template?

For example, {% if states('sensor.dishwasher_power')| int(default=0) > 5 **FOR 60 SECONDS**%}

      state: >
         {% if states('sensor.dishwasher_power')| int(default=0) > 5 %}
           WASHING
         {% elif states('sensor.dishwasher_power')| int(default=0) < 5 and states('sensor.dishwasher_power')| int(default=0) > 1 %} 
           COMPLETE
         {% elif states('sensor.dishwasher_power')| int(default=0) <= 1 %}
           OFF
         {% endif %}

Thanks