I am trying to measure a machine. This works to some extend pretty good. But I want to exclude values, if they have not been at a specifc treshold for a certain timespan.