Code to allow tracking of average response time