this is a typical case for process batches, you can ask your local admin to set up APRM (need SQL server), with a batch that trigger when the value goes above the threshold, and end when it goes below ; and then you can calculate batch duration with a calc property.