implement timer to save history after n ms inactivity #135