Add timer to compute elapsed time