Measure the run time.