
85 Cal.App.3d 292 (1978)
149 Cal. Rptr. 344
THE PEOPLE, Plaintiff and Respondent,
v.
JAMES P. RICHARD, Defendant and Appellant.
Docket No. 31642.
Court of Appeals of California, Second District, Division One.
October 4, 1978.
*295 COUNSEL
Quin Denvir, State Public Defender, under appointment by the Court of Appeal, Charles M. Sevilla, Chief Assistant State Public Defender, and Edward H. Schulman, Deputy State Public Defender, for Defendant and Appellant.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Edward T. Fogel, Jr., and Vincent J. O'Neill, Jr., Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
THOMPSON, J.
In this appeal from a judgment of conviction of first degree murder and of first degree burglary with the infliction of great *296 bodily injury, we face the recurring problem of the timeliness of a motion to disqualify a trial judge filed pursuant to Code of Civil Procedure section 170.6. In particular, we consider the timeliness of a section 170.6 motion not made until a defendant in a criminal case has forced a continuance by his intransigence in refusing to appear for trial and of a subsequent section 170.6 motion made after a mistrial declared by reason of the failure of the jury to agree.
We conclude that the motions to disqualify the trial judge made in the case at bench were untimely. We also conclude that a contention of trial court error in failing to instruct sua sponte is not supported by the record. Accordingly, we affirm the judgment.

170.6 Motion
Defendant, James P. Richard, was charged with first degree murder, with first degree burglary, and with having inflicted great bodily injury in the commission of the latter crime. Richard was arraigned on January 14, 1976, and entered his plea of not guilty. The public defender was appointed as his counsel. Trial was set for January 21 and then continued by stipulation to March 1, 1976. On Richard's successive motions, the case was continued to October 25, 1976, when it was again continued to November 29 because of "defendant's late disclosure to his counsel of possible defense witnesses." By stipulation, trial was continued to December 13 and again on defendant's motion to April 27, 1977. On that date, Richard's motion to relieve the public defender and to proceed in pro. per. was granted. The case was continued to May 2 due to a congested calendar. On May 2, the trial judge denied defendant's motions pursuant to Penal Code sections 995 and 1538.5 and continued the trial to the next day. On the morning of May 3, with jury selection scheduled to commence, Richard, now acting in pro. per., refused to leave the "lockup" for the courtroom. He stated that he was not prepared because he needed further research. The court continued the matter until the afternoon to let Richard decide whether he would come to court. The afternoon of May 3, Richard appeared and stated he was not ready for trial. Noting that Richard appeared to be engaged in a tactic of delay, the trial judge continued the trial to May 11. He admonished Richard that if Richard again refused to participate in his defense the court would revoke Richard's pro. per. privileges and appoint counsel to represent him. Richard moved to disqualify the trial judge for prejudice pursuant to subdivision 5 of Code of Civil Procedure section 170 and peremptorily pursuant to Code of Civil Procedure section 170.6. The 170.6 motion was *297 denied as untimely and the motion to disqualify for cause was denied after hearing before another judge.
Trial commenced to a jury on May 12. On May 23, the jury reported itself deadlocked. A mistrial was declared and the matter continued to May 25, 1977, for trial setting and motions. On May 25, trial was set for June 27 in the department of the same judge who had presided at the first trial. On June 20, Richard again filed a motion to disqualify the trial judge pursuant to Code of Civil Procedure section 170.6. The motion was denied as untimely. The retrial resulted in Richard's conviction.
In this appeal, Richard contends that the trial court lacked jurisdiction to proceed because of his motions pursuant to Code of Civil Procedure section 170.6.
The first motion. Code of Civil Procedure section 170.6, which permits what is in effect a peremptory disqualification of a trial judge, provides in part that: "Where the judge ... assigned to or who is scheduled to try the cause or hear the matter is known at least 10 days before the date set for trial or hearing, the motion [to disqualify] shall be made at least five days before that date. If directed to the trial of a cause where there is a master calendar, the motion shall be made to the judge supervising the master calendar not later than the time the cause is assigned for trial...."
Here the matter was set for trial on May 3. The identity of the trial judge had been known to Richard long before 10 days prior to May 3. His first motion to disqualify the judge pursuant to Code of Civil Procedure section 170.6 was not made "at least five days" prior to the date for which trial was set.
Thus, unless the continuance of the matter from May 3 to May 11 commenced a new five-day period for filing the motion, the trial court properly denied it as untimely.
On the record here, the continuance did not commence the period anew.
We note at the outset that, in language at least, the California cases are in disarray concerning the effect of a continuance upon the timeliness of a motion pursuant to Code of Civil Procedure section 170.6. Cases such as Eagle Maintenance & Supply Co. v. Superior Court (1961) 196 Cal. App.2d 692, 695 [16 Cal. Rptr. 745], Woodman v. Selvage (1968) 263 Cal. App.2d *298 390, 394 [69 Cal. Rptr. 684], People v. Escobedo (1973) 35 Cal. App.3d 32, 39-40 [110 Cal. Rptr. 550], and Zdonek v. Superior Court (1974) 38 Cal. App.3d 849, 852 [113 Cal. Rptr. 669], seemingly declare that if the motion to disqualify is filed at least five days before the date to which a trial or hearing is continued it is timely. Cases such as Hospital Council of Northern Cal. v. Superior Court (1973) 30 Cal. App.3d 331, 338-340 [106 Cal. Rptr. 247], and People v. Kennedy (1967) 256 Cal. App.2d 755, 763 [64 Cal. Rptr. 345], seemingly declare that it is not. In re Jose S. (1978) 78 Cal. App.3d 619, 627 [144 Cal. Rptr. 309], seeks to resolve the dilemma by holding that a continuance to a particular department is not an assignment to a particular judge so that a motion made after the continuance when the judge to hear the matter first becomes known is timely. In People v. Wilks (1978) 21 Cal.3d 460 [146 Cal. Rptr. 364, 578 P.2d 1369], our Supreme Court gives a very broad meaning to the phrase "cause where there is a master calendar," and by so doing imposes a very strict test of timeliness of a section 170.6 motion where there is a master calendar. Wilks involves a situation in which one judge was designated both a master calendar and trial judge. The case had been assigned to him for trial and not for reassignment in his master calendar capacity. (Wilks, supra, at pp. 464-466.) The judge reassigned the case for trial to another judge and, as soon as the identity of the other judge became known, Wilks filed his section 170.6 motion with the judge who was to try the case. Despite the fact that the reassignment was made by the first judge wearing his trial judge rather than master calendar judge hat, the Supreme Court held that the section 170.6 motion was untimely because not made in the master calendar department.
While Wilks, by applying an ultra-strict test of timeliness in the master calendar situation, tends to validate the line of cases which applies a strict test of timeliness where a continuance is involved, we need not determine the case at bench on that premise.
(1) The liberal rule of the one line of cases, which holds that the five-day period begins anew when a continuance of a trial date is granted, must be construed to be limited to those situations where the continuance is sought in good faith for good cause. A party who has allowed the time for a section 170.6 motion to expire may not be permitted to extend it by his own bad faith conduct which prevents a trial from beginning on the date set for it. Here substantial evidence supports the trial court's determination that the last continuance was not sought in good faith but as a delaying tactic. Richard's intransigence in refusing to leave the lockup for the courtroom after he had been granted his Faretta right of *299 self-representation (Faretta v. California (1975) 422 U.S. 806 [45 L.Ed.2d 562, 95 S.Ct. 2525]) supports the inference that Richard was deliberately playing off his pro. per. status against a bad faith claim that he was not ready for trial. The record supports the additional inference that the trial court granted the last continuance not because it concluded that good cause had been shown for it but rather to avoid Richard's future claim of error flowing from his gambit. Thus, the case at bench differs from the ordinary situation where the trial court's grant of a continuance itself establishes that the continuance was sought in good faith for good cause.
(2) The second motion. Because a section 170.6 motion must be made before trial, "it cannot be entertained as to subsequent hearings which are a part or a continuation of the original proceedings." (Jacobs v. Superior Court (1959) 53 Cal.2d 187, 190 [1 Cal. Rptr. 9, 347 P.2d 9], declared applicable to the current version of Code Civ. Proc., § 170.6 in Solberg v. Superior Court (1977) 19 Cal.3d 182, 198, fn. 13 [137 Cal. Rptr. 460, 561 P.2d 1148].) Similarly, a motion pursuant to Code of Civil Procedure section 170.6 is untimely if made after the judge has presided at a proceeding involving a determination of contested issues of fact relating to the merits. (Code Civ. Proc., § 170.6, subd. (2); see Andrews v. Joint Clerks etc. Committee (1966) 239 Cal. App.2d 285, 295 [48 Cal. Rptr. 646].) The motion to disqualify the judge who has previously presided over the matter is deemed untimely where subsequent proceedings are a continuation of it to vindicate a policy against permitting a litigant "to gamble on obtaining a favorable decision from one judge, and then, if confronted with an adverse judgment, [allowing the litigant] to disqualify him without presenting facts showing prejudice, in the hope of securing a different ruling from another judge...." (Jacobs v. Superior Court, supra, 53 Cal.2d 187, 191.) The identical policy is seemingly the foundation for the requirement that the motion to disqualify be made before the judge has presided over a hearing on contested issues of fact going to the merits.
(3) The timeliness of Richard's second motion to disqualify the trial judge thus turns upon the legal effect to be given the proceedings which resulted in a mistrial because of the jury's failure to agree. If the reinstituted trial is in legal effect a continuation of the earlier proceedings, or if the trial judge to whom the motion is directed is deemed to have presided over a hearing on contested issues of fact going to the merits of the case, then the motion is not timely. If, however, the earlier proceedings leading to the mistrial are ignored, the motion was timely filed.
*300 Richard asserts that the proceedings leading to the mistrial must be ignored. He argues that the declaration of mistrial had the effect of placing the parties in the same position as if there had been no trial at all. Whatever may be the truth of that argument in other contexts, it is not valid as applied to the timeliness of a section 170.6 motion. A full scale hearing involving contested factual issues going to the merits of the case did in fact take place. The proceedings at trial after the mistrial was declared were in fact a continuation of the earlier trial. Vindication of the policy underpinning, requiring that the disqualification motion be made before the commencement of trial and before the judge to whom the motion is directed has presided over a proceeding involving the determination of factual issues going to the merits, requires that the legal consequences flowing from the earlier proceedings follow the facts. Otherwise the litigant is in the position of having had the benefit of a preview of the judge's approach to the case before deciding to file his motion. The policy underpinning of the statutory requirements of the portions of Code of Civil Procedure section 170.6 which are here relevant is, in that situation, to deny to litigants the opportunity of seeking different rulings from a different judge.
Conclusion. We hence conclude that Richard's motions to disqualify the trial judge pursuant to Code of Civil Procedure section 170.6 were untimely and therefore properly denied.

Sua Sponte Instruction
The residence of Annette Weingarten was burglarized and Ms. Weingarten was murdered in the process. Richard was connected with the crimes by his fingerprints found on a window screen at the point of entry to the Weingarten home, his opportunity to "case" the location by his presence at his nearby girl friend's apartment during the preceding month, and by the signature of "James Richard" on a pawnbroker's identification document recording the pawning of a watch taken in the burglary. Inconsistent statements made by Richard with respect to his having been in the Weingarten yard near the window screen preceding the burglary corroborated his guilt.
Richard's defense consisted of testimony by his girl friend, Yolanda Scott. Ms. Scott stated she and two companions, not including Richard, had gone to the Weingarten home and found the screen broken off the window and protective ironwork on it bent. Ms. Scott related that she and her companions had entered the Weingarten home where one of the *301 companions killed Ms. Weingarten and took the watch, giving it to Scott who later gave the watch to Richard. According to Ms. Scott, Richard attempted to replace the window screen after she told him of the burglary.
The trial court instructed the jury on the definition of burglary and of felony murder. It instructed on the defense of alibi, but also that if the evidence established beyond a reasonable doubt that the defendant aided and abetted the commission of the offenses charged, "the fact, if it is a fact, that he was not present at the time and place of the commission of the alleged offense for which he is being tried is immaterial and does not, in and of itself, entitle him to an acquittal." The trial court instructed that, "All persons concerned in the commission of a crime who either directly and actively commit the act constituting the offense or who with knowledge of the unlawful purpose of the perpetrator of the crime aid and abet in its commission or, whether present or not, who advise and encourage its commission, are regarded by the law as principals in the crime thus committed and are equally guilty thereof." The court defined aiding and abetting, stating: "A person aids and abets the commission of a crime if, with knowledge of the unlawful purpose of the perpetrator of the crime, he aids, promotes, encourages or instigates by act or advice the commission of such crime."
Richard does not challenge either the accuracy or applicability of the jury instructions given by the trial court. He, however, points to the proposition that the defense testimony supports his guilt of the uncharged and unincluded offense of accessory after the fact. While conceding that he did not request an instruction that an accessory after the fact is not an aider and abettor, Richard contends that the trial court was required by the defense testimony to so instruct the jury on its own motion.
We conclude that the contention lacks merit.
(4) The duty of a trial court to instruct on its own motion and without a request to do so extends only to "`the general principles of law relevant to the issues raised by the evidence'" i.e., "`those principles closely and openly connected with the facts before the court, and which are necessary for the jury's understanding of the case.'" (People v. Sedeno (1974) 10 Cal.3d 703, 715 [112 Cal. Rptr. 1, 518 P.2d 913].) Here the jury was instructed that an aider or abettor must, with knowledge of the unlawful purpose of the perpetrator of the crime, aid, promote, encourage, instigate, or advise the criminal act. That definition instructs on the *302 applicable general principle of law and excludes from the definition conduct which would subject a person to liability as an accessory after the fact. If the jury had followed that instruction and accepted as true the defense testimony, it would have acquitted Richard.

Disposition
The judgment is affirmed.
Lillie, Acting P.J., and Hanson, J., concurred.
A petition for a rehearing was denied October 23, 1978, and appellant's petition for a hearing by the Supreme Court was denied November 30, 1978.
