Measure timing with gettimeofday.