Calculating the execution time of a for-loop


I want to calculate the total execution time of a for loop, how can I do this?

Thank you...

I'd use a scope.
Or another Arduino.

Inside the code... Are there any commands to put before and after the for-loop, to calculate how much time does it take for the execution?

Store the value of millis() (or micros) in an unsigned long variable just before the loop. Store into another variable when loop is done. Print the two variables or the difference between them.

You could use micros and Serial.print.
You'll need to be careful that the method doesn't affect the timing.