prevent negative sleep time