Logs the execution time for blocks of code