automatically adjust localStorage.avgTicketTime to only keep the latest 40 entries