Section 151. A railroad corporation, or receiver or assignee thereof, or its or his servant or agent, shall not wilfully or negligently obstruct or unnecessarily or unreasonably use or occupy a public way, or in any case wilfully obstruct, use or occupy it with cars or engines for more than five minutes at one time; and if a public way has been thus used or occupied with cars or engines, the railroad corporation, or receiver or assignee thereof, shall not again use or occupy it with the cars or engines of a freight train, until a sufficient time, not less than three minutes, has been allowed for the passage across the railroad of such travelers as were ready and waiting to cross when the former occupation ceased. A railroad corporation, receiver or assignee thereof, who violates this section, shall forfeit not less than two hundred nor more than five hundred dollars.