The Court of Appeal holds that a peremptory challenge to a judge under CCP 170.6 was untimely where the relevant proceeding, a habeas petition relating to defendant’s inadequate medical treatment in the county jail, was a continuation of the underlying criminal case. The court reasons that even though the habeas petition did not relate to a criminal judgment, defendant had raised the same pretrial confinement issues in the context of the criminal case.