Parametrize time interval and threshold