If the defendant is not charged or tried, as provided in Section 1382, and sufficient reason therefor is shown, the court may order the action to be continued from time to time, and in the meantime may discharge the defendant from custody on his or her own undertaking of bail for his or her appearance to answer the charge at the time to which the action is continued.