Where a district court has found that there is probable cause to believe that an adult has committed a felony, the accused, if he is held continuously in custody thereafter, shall be forever discharged from prosecution for such offense if no trial is commenced in the circuit court within five months from the date such probable cause was found by the district court; and if the accused is not held in custody but has been recognized for his appearance in the circuit court to answer for such offense, he shall be forever discharged from prosecution therefor if no trial is commenced in the circuit court within nine months from the date such probable cause was found.
If there was no preliminary hearing in the district court, or if such preliminary hearing was waived by the accused, the commencement of the running of the five and nine months periods, respectively, set forth in this section, shall be from the date an indictment or presentment is found against the accused.
If an indictment or presentment is found against the accused but he has not been arrested for the offense charged therein, the five and nine months periods, respectively, shall commence to run from the date of his arrest thereon.
Where a case is before a circuit court on appeal from a conviction of a misdemeanor or traffic infraction in a district court, the accused shall be forever discharged from prosecution for such offense if the trial de novo in the circuit court is not commenced (i) within five months from the date of the conviction if the accused has been held continuously in custody or (ii) within nine months of the date of the conviction if the accused has been recognized for his appearance in the circuit court to answer for such offense.
The provisions of this section shall not apply to such period of time as the failure to try the accused was caused:
But the time during the pendency of any appeal in any appellate court shall not be included as applying to the provisions of this section.
For the purposes of this section, an arrest on an indictment or warrant or information or presentment is deemed to have occurred only when such indictment, warrant, information, or presentment or the summons or capias to answer such process is served or executed upon the accused and a trial is deemed commenced at the point when jeopardy would attach or when a plea of guilty or nolo contendere is tendered by the defendant. The lodging of a detainer or its equivalent shall not constitute an arrest under this section.
Va. Code § 19.2-243