(1) When the county commissioners decide it will be for the benefit of a prisoner and in the public interest, they may employ at labor on the streets of incorporated cities or towns, on the roads, bridges, or other public works in the county, or on other projects for which the governing body of the county could otherwise lawfully expend public funds and which it determines to be necessary for the health, safety, and welfare of the county, a person charged with a misdemeanor and confined in the county jail for failure to give bail.
(2) No person shall be employed under this section without her or his written consent.
(3) No person shall work more than 10 hours in a 24-hour period.
(4) If a person employed under this section is acquitted or discharged from further prosecution, she or he shall be paid by the county at the rate of $5 for each day employed.
(5) If a person employed under this section is convicted, the time she or he was actually employed may be credited on any sentence of imprisonment, and if the person is fined, the value of the labor at $5 per day shall be credited to her or his fine and costs.
(6) No charge for food and lodging shall be made against a prisoner employed under this section.
(7) The county commissioners shall cause records to be kept of employment under this section, and a copy of the record shall be furnished to the court having jurisdiction of the prisoner.