Add timer to measure the time of the execution