Reset global timer with formula

Hello, I'm looking to check and see if a global switch is already triggered (it's on a 5 second timer). If it is then I want to reset the timer and if not then switch as normal.

$if(gv(switch)=1, do this, else do this)$

I found this formula but am having trouble finding if there is a way to reset the timer.