Using a timer


I want to implement a timer in my program. For example, If I turn on a led and x seconds after it turns off(with the help of a switch for example), I want the Arduino to know the time it took from ON to OFF. I looked at some functions like Micros, but they mention that Micros "Returns the number of microseconds since the Arduino board began running the current program". Difference is I don't want to know the time since the Arduino started running the program but when I've pressed the switch to turn ON the LED and again to turn OFF the LED.

Thanks for your help.

Take a look at the Blink Without Delay sample (under Digital), it'll get you started in the right direction