You want to calculate the execution time of your code only then it would calculate the execution time of your code but the multitasking glitch is something you have to deal with but I am sure the effect on your personal computer would not be very high.

time_t can help you get the time