(a) Except as provided in paragraph (c), when separate sentences of imprisonment are imposed on a defendant for two or more crimes, whether charged in a single indictment or information or separately, or when a person who is under sentence of imprisonment in this state is being sentenced to imprisonment for another crime committed prior to or while subject to such former sentence, the court in the later sentences shall specify whether the sentences shall run concurrently or consecutively. If the court does not so specify, the sentences shall run concurrently.
(b) When a court imposes sentence for a misdemeanor or gross misdemeanor offense and specifies that the sentence shall run consecutively to any other sentence, the court may order the defendant to serve time in custody for the consecutive sentence in addition to any time in custody the defendant may be serving for any other offense, including probationary jail time or imprisonment for any felony offense.
(c) An inmate of a state prison who is convicted of committing an assault within the correctional facility is subject to the consecutive sentencing provisions of section 609.2232.
If the court specifies that the sentence shall run consecutively and all of the sentences are for misdemeanors, the total of the sentences shall not exceed one year. If the sentences are for a gross misdemeanor and one or more misdemeanors, the total of the sentences shall not exceed two years. If all of the sentences are for gross misdemeanors, the total of the sentences shall not exceed four years.