For how long a funcion is running in arduino.

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?

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.

Unless it's a really complicated one. or it involves serial comms, I'd use "micros ()"