Improve calculation of average response time