fix TimeToFailure calculation for prediction by time