Go Down

Topic: For how long a funcion is running in arduino. (Read 603 times) previous topic - next topic

^Mr.Rat^

Hi i have an arduino duemilanove and i want to see for how long a function is running in ms .
Can this happen?and how?

PaulS

Call millis() before the function. Call it again after the function ends. The difference in values is the length of time the function to execute, in milliseconds.

AWOL

Unless it's a really complicated one. or it involves serial comms, I'd use "micros ()"
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up