Calculate the execution time The difference between the end time and start time is the execution time. Get the execution time by subtracting the start time from the end time.