No officer or agent of any street railroad company shall exact from any of its employees more than ten hours’ labor in the twenty four, constituting a day and embraced within twelve consecutive hours, except that in cases of accident, unavoidable delay, or emergency extra labor may be permitted for extra compensation, with the consent of the employee.

Any officer or agent of any of the railroads violating this section shall be fined not more than fifty dollars, or imprisoned for not more than two months, or both.