
110 Ill. App.3d 531 (1982)
442 N.E.2d 655
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
GARY HATCH, Defendant-Appellant.
No. 81-400.
Illinois Appellate Court  Second District.
Opinion filed November 24, 1982.
G. Joseph Weller and Josette Skelnik, both of State Appellate Defender's Office, of Elgin, for appellant.
*532 Michael Fitzsimmons, State's Attorney, of Wheaton (Phyllis J. Perko, of State's Attorneys Appellate Service Commission, of counsel), for the People.
Judgment affirmed.
JUSTICE REINHARD delivered the opinion of the court:
After a bench trial upon stipulated evidence, defendant, Gary Hatch, was convicted of burglary (Ill. Rev. Stat. 1979, ch. 38, par. 19-1) and received an extended-term sentence of 10 years' imprisonment. On appeal, defendant contends that he was denied his statutory right to a speedy trial either because he was not tried within 120 days of being taken into custody of Du Page County authorities or because he was not tried within 160 days from the date of his demand for speedy trial filed at a time when he was on bond.
Defendant was arrested in Du Page County for burglary on September 27, 1980, and was released on bond that same day. On October 9, 1980, defendant's privately retained counsel filed an appearance and a written speedy-trial demand on behalf of the defendant. On that date probable cause was found at the preliminary hearing and his arraignment was set for November 7, 1980. Defendant failed to appear for his November 7, 1980, arraignment, and the court ordered that defendant's bond be forfeited and issued a warrant for defendant's arrest. Thereafter, defendant was arrested in Kane County and was charged by the Kane County State's Attorney for an unrelated felony offense alleged to have occurred in Kane County on September 10, 1980. Defendant appeared in the Du Page County circuit court on December 12, 1980, pursuant to a writ (presumably a writ of habeas corpus ad prosequendum although the writ is not in the record) while still in custody of the Kane County authorities. At that time, defendant was arraigned on the Du Page County burglary charge, the public defender was appointed to serve as counsel for defendant, and a discovery schedule and a trial date of February 24, 1981, were set. Defendant was then returned to Kane County where he was held until January 22, 1981, when proceedings there terminated upon his conviction of theft under $150 and his sentence of 70 days in the Kane County jail with credit for time served.
Defendant was brought before the circuit court of Du Page County on January 23, 1981, at which time his bond was revoked. The defendant was actually returned to Du Page County on January 22, 1981. On January 23, 1981, the Illinois Department of Corrections (DOC) filed a parole violation warrant with Du Page County officials. Defendant was apparently released on that date to the DOC in whose custody he remained until February 27, 1981, when he next appeared in the Du Page County circuit court. On February 27, 1981, his trial *533 was continued to April 7, 1981, and later again continued until April 20, 1981, both on the court's motion. On April 16, 1981, defendant filed four motions for discharge, based on the alleged violation of defendant's statutory right to a speedy trial. The trial court denied defendant's motions and identified January 23, 1981, as the date on which the 120-day speedy-trial term began to run. Defendant was thereupon tried by the court upon stipulated evidence, found guilty, and subsequently sentenced to an extended term of 10 years to run consecutive to "any sentence that he has been given prior to this date or is serving prior to this date."
Defendant contends that he was in custody in Du Page County for purposes of the 120-day statutory speedy-trial term (Ill. Rev. Stat. 1979, ch. 38, par. 103-5(a)) from the date of his arraignment on December 12, 1980, for the Du Page County burglary charge. He argues that even though his case was not terminated in Kane County until January 22, 1981, there was no obstacle to Du Page County's prosecution once he had been brought back for arraignment in Du Page County and a trial date had been set. The State's position is that the 120-day statutory speedy-trial term commenced in Du Page County on January 22, 1981, the date on which the Kane County proceedings were terminated by defendant's plea of guilty and sentencing, and on which defendant was returned to Du Page County.
 1 Section 103-5(a) of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1979, ch. 38, par. 103-5(a)) provides, in pertinent part, that "[e]very person in custody in this State for an alleged offense shall be tried by the court having jurisdiction within 120 days from the date he was taken into custody * * *." Defendant maintains that the crucial issue is whether any actual obstacle to his prosecution exists in a particular county, citing our decision in People v. Hollowell (1979), 78 Ill. App.3d 515, 397 N.E.2d 245, which cites our opinion in People v. Kerley (1979), 72 Ill. App.3d 916, 391 N.E.2d 225. He contends that on December 12, 1980, he was before the Du Page County circuit court and no obstacle prevented his prosecution there despite the fact that his prosecution had not terminated in Kane County.
This argument misses the mark in interpreting our holdings in Kerley and Hollowell as well as being at odds with other appellate decisions which have addressed the issue of when a defendant is in custody for purposes of the commencing of the 120-day speedy-trial term under circumstances where a defendant simultaneously faces charges pending from two counties. It is clear in Kerley that the defendant therein commenced being in custody on the Du Page County detainer warrant upon the termination of the Cook County proceedings by the *534 entry of the judgment of conviction and sentence. (72 Ill. App.3d 916, 919, 391 N.E.2d 225.) It is in the context of the termination of the Cook County proceedings that we observed that no obstacle existed to trying the defendant in Du Page County and he could be considered in custody in Du Page County. Hollowell does not support any broader application of what we said in Kerley. We recently restated this position in People v. Wentlent (1982), 109 Ill. App.3d 291, 297, 440 N.E.2d 296, therein citing additional appellate court decisions following this same reasoning, as follows:
"Where, however, defendant is in custody awaiting trial in one county and charges are pending against him in another county, then a different rule applies. In that situation, the 120-day period does not begin to run until the proceedings in the first county end and defendant is held in custody by or for the second county on the subject charges. (People v. Evans (1979), 75 Ill. App.3d 949, 394 N.E.2d 710; People v. Kerley (1979), 72 Ill. App.3d 916, 391 N.E.2d 225; People v. Karr (1979), 68 Ill. App.3d 1040, 386 N.E.2d 927; People v. Clark (1968), 104 Ill. App.2d 12, 244 N.E.2d 842.)"
Defendant seeks to escape application of this principle by the fact that he was brought by writ before the circuit court in Du Page County, arraigned, and had his trial date set. Notwithstanding the fact that he was thereafter returned to Kane County for continuation of the proceedings there, he maintains there was no obstacle to Du Page County's prosecution of him. In a closely similar factual situation to the case at bar, the appellate court in People v. Gardner (1982), 105 Ill. App.3d 103, 433 N.E.2d 1318, held that the 120-day term began to run on that date of the termination of the proceedings in Jackson County despite the fact that the defendant therein had been delivered to Williamson County pursuant to a writ of habeas corpus ad prosequendum, appeared before the court, and then returned to Jackson County for the conclusion of its prosecution. (105 Ill. App.3d 103, 109-12, 433 N.E.2d 1318.) We approve of the holding in Gardner and find it is applicable to the facts here.
Defendant, herein, as in Gardner, was in custody and under prosecution in one county, was brought to a second county by writ prior to the termination of proceedings in the first county, appeared before the court in the second county, and returned thereafter to the first county until the proceedings there were terminated. Defendant attempts to distinguish Gardner by pointing out that he was initially arrested in Du Page County on September 27, 1980, before Kane County acquired custody of him, whereas in Gardner the defendant was not initially *535 arrested in Williamson County. He maintains that under these circumstances he comes within the rule prescribed in People v. Fosdick (1967), 36 Ill.2d 524, 224 N.E.2d 242.
In Fosdick, the defendant was first charged with a Champaign County crime, then was arrested in De Witt County on other charges. He later escaped from De Witt County, and was eventually apprehended in Champaign County by F.B.I. agents acting under the authority of a Federal fugitive-from-justice warrant obtained by De Witt County. While in the Champaign County jail, the defendant was arrested on the Champaign County warrant, taken before a magistrate and served with a copy of the original Champaign County complaint. On the next day, the complaint was dismissed and another complaint was filed alleging the same charge based upon the same conduct. Another warrant was issued but not served upon the defendant who was then returned to De Witt County and tried and convicted of other charges. The supreme court held that the defendant was "in custody" of Champaign County from the date of the service of the Champaign County arrest warrant. The 120-day period did not begin on a later date when De Witt County, having finished with the defendant, turned him back over to Champaign County in order to allow the latter county to proceed against him. The court reasoned that such a voluntary dismissal of the charge by Champaign County without notice to the defendant cannot be used to evade the provisions of the 120-day rule. 36 Ill.2d 524, 528, 224 N.E.2d 242.
 2 In the instant case, defendant was originally arrested in Du Page County. While on bond for the Du Page County burglary, he was later arrested in Kane County arising out of an unrelated charge. At this point, unlike in Fosdick, Du Page County had not voluntarily given him over to another county and dismissed its charges, but, rather, Kane County had acquired custody over defendant through their own independent action arising from a separate charge in its county. In this context, the facts here are distinguishable from those in Fosdick. Defendant's subsequent appearance by writ before the circuit court of Du Page County on December 12, 1980, for a limited purpose, does not, as held in Gardner, mean that he was in the custody of Du Page County any earlier than the termination of the Kane County proceedings. See People v. Gardner (1982), 105 Ill. App.3d 103, 111, 433 N.E.2d 1318.
 3 Were we to hold otherwise and conclude that defendant's limited appearance in Du Page County, pursuant to a writ, for arraignment and a trial setting commenced the 120-day term, then the 120-day term would be running simultaneously in Du Page and Kane *536 counties. Not only would this interpretation create administrative problems if simultaneous separate prosecutions were required within 120 days, but it would also discourage a second county from initiating the preliminary steps in a criminal proceeding thereby ultimately causing some delay in the subsequent trial in the second county which would inure to the defendant's detriment. We cannot interpret section 103-5(a) as requiring such a result. Moreover, such an interpretation would certainly be anomalous in the light of section 103-5(e) which allows an additional 160 days to try a defendant after judgment relative to the first charge when that defendant is simultaneously in custody upon more than one charge pending against him in the same county. (See Ill. Rev. Stat. 1979, ch. 38, par. 103-5(e).) For the foregoing reasons, we conclude that the defendant's appearance for a limited purpose on December 12, 1980, in Du Page County, pursuant to a writ, prior to the termination of the proceedings in Kane County did not render him in custody to trigger the 120-day speedy-trial provision. Instead, the 120-day term began on January 22, 1981, upon his return from Kane County upon the termination of the proceedings there. Since defendant's trial commenced on April 23, 1981, he was tried within 120 days of January 22, 1981, in compliance with section 103-5(a).
Defendant next contends that he was not tried within 160 days of his demand for a speedy trial made on October 9, 1980, while he was on bond for the Du Page County burglary charge. The State maintains that since defendant's bond was later revoked for his failure to appear in court on November 7, 1980, the statutory 160-day speedy-trial term which pertains only to those on bail or recognizance is inapplicable under the facts present in this case. Alternatively, the State argues that even if the 160-day rule did apply here, any delay in bringing defendant to trial within that term was occasioned by the defendant's own actions thereby tolling the running of the 160-day term.
 4 Section 103-5(b) of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1979, ch. 38, par. 103-5(b)) provides that "[e]very person on bail or recognizance shall be tried by the court having jurisdiction within 160 days from the date defendant demands trial * * *." We have found no Illinois case which has had to determine whether the provisions of sections 103-5(a) and 103-5(b) both are applicable after a defendant on bond who had previously demanded a speedy trial had his bond revoked and is in custody. As support for its position, the State cites our decision in People v. Leannah (1981), 94 Ill. App.3d 628, 418 N.E.2d 1054, where we held that a person not in custody or *537 on bond or recognizance is not entitled to the benefits of the speedy-trial provisions of section 103-5. (94 Ill. App.3d 628, 629-30, 418 N.E.2d 1054.) By analogy, the State contends that once bond is revoked, defendant is not on bail or recognizance and the provisions of section 103-5(b) are inapplicable. We find some merit to the State's position that the protection afforded a defendant on bail or recognizance under section 103-5(b) is inapplicable once bail is revoked, particularly, as shown here, where the defendant's own conduct has caused such a revocation. However, we need not determine whether sections 103-5(a) and 103-5(b) are always exclusive of each other since it is readily apparent here that even if defendant may claim the benefit of the 160-day speedy-trial term of section 103-5(b), his failure to appear for arraignment on November 7, 1980, and his subsequent arrest and the trial proceedings in Kane County tolled the running of this statutory period until termination of the Kane County proceedings on January 22, 1981.
Section 103-5(f) provides, inter alia, that "[d]elay occasioned by the defendant shall temporarily suspend for the time of the delay the period within which a person shall be tried * * *." (Ill. Rev. Stat. 1979, ch. 38, par. 103-5(f).) In determining if a delay in the trial was occasioned by the defendant, the court must carefully examine the facts of each case to prevent a "mockery of justice" either by technical evasion of the right to speedy trial by the State, or by a discharge of a defendant by a delay in fact caused by him. (People v. Fosdick (1967), 36 Ill.2d 524, 529, 224 N.E.2d 242.) The creation and enforcement of constitutional and statutory rights for the protection of defendants cannot be used for manipulation in such a way as to provide an avenue to escape legitimate prosecution. (People v. Sibley (1976), 41 Ill. App.3d 616, 622, 354 N.E.2d 442.) A defendant is considered to have occasioned a delay when he requests a continuance, agrees to a continuance, or when his actions otherwise cause or contribute to the delay. (People v. Bivins (1981), 97 Ill. App.3d 386, 392, 422 N.E.2d 1044; People v. DeCarlis (1980), 88 Ill. App.3d 634, 637, 410 N.E.2d 677.) A defendant's failure to appear at a scheduled court hearing is a delay caused by the defendant (see People v. Cornwell (1973), 9 Ill. App.3d 799, 800, 293 N.E.2d 139), and the tardiness of a defendant which renders a continuance necessary, even if requested by the State, may be a delay occasioned by the defendant. See People v. Boyce (1977), 51 Ill. App.3d 549, 552-54, 366 N.E.2d 914.
 5 Under the circumstances present here, the defendant while on bond failed to appear for his arraignment on November 7, 1980. The defendant concedes that a delay was occasioned by him, but maintains *538 that this delay constituted only eight days since Du Page County officers visited him in the Kane County jail on November 15, 1980. We conclude, however, that the actual delay occasioned by the defendant was the period of time from November 7, 1980, until January 22, 1981, the latter date being the time when the Kane County proceedings terminated and defendant was returned to Du Page County. Certainly, defendant's own actions in failing to appear on November 7, 1980, and his arrest and prosecution in Kane County, culminating in his guilty plea there on January 22, 1981, delayed the Du Page County prosecution until the January 22 date. For the reasons previously stated above, his limited appearance on December 12, 1980, before the court in Du Page County did not cause him to be in custody in Du Page County for the 120-day term. Likewise, we conclude that this single appearance did not terminate the delay caused by the defendant in his prosecution as he created the necessity for postponement of trial until the Kane County proceedings were completed. Viewing the delay between November 7, 1980, and January 22, 1981, as occasioned by the defendant and thereby tolling the 160-day term during that time, we find the 160-day speedy-trial term was not violated.
Accordingly, the trial court did not err in denying defendant's motions for discharge, and we affirm the judgment of the circuit court of Du Page County.
Affirmed.
UNVERZAGT and NASH, JJ., concur.
