Moved the timing functions in from out of repository.