The 120-day term must be one continuous period of incarceration. In computing the 120-day term, separate periods of incarceration may not be combined. If a defendant is taken into custody a second (or subsequent) time for the same offense, the term will begin again at day zero.
For purposes of computing the 160 day period under this subsection (b), every person who was in custody for an alleged offense and demanded trial and is subsequently released on pretrial release or recognizance and demands trial, shall be given credit for time spent in custody following the making of the demand while in custody. Any demand for trial made under this subsection (b) shall be in writing; and in the case of a defendant not in custody, the demand for trial shall include the date of any prior demand made under this provision while the defendant was in custody.
725 ILCS 5/103-5