Timer class to profile code