time update and threshold setting