We have a Stopwatch class for doing run time measurements like this.