The Mendix Microflow Timer specifically states that it can be used to time as long as a certain form is open. But there are more options available in the Marketplace. I don't know your specific usecase, but take a look at the other modules that are available.