Trigger conditions

Is there a way to say only trigger an action if a condition is met for a period of time rather than instantly?

Reason I ask and maybe not the best reason is that i seem to have trouble with one of my can values dropping out of the stream. So when there is a data drop out the alarm triggers. But it’s just for an instant.

One way to do that is to increase a dummy variable on instant and trigger an action when dummy variable is greater than a certain value.