Added a Timer object and methods for performance measurements