All suits for the recovery of any fine, and prosecutions for the commission of any offense made punishable by ordinance of a city of the second class or village, shall be barred in one year after the commission of the offense for which the fine is sought to be recovered, or the prosecution is commenced.