Measure CPU seconds instead of wall time, and move the timing functions into a