Time over threshold in the presence of noise