LED glowing time calculation

Hai All,
By using arduino uno I want to display the LED glowing time in serial window say example if I connected one LED in 2 pin and I glow it for 30 seconds means in the serial window I want to show 30 sec like that. Please guide me.

What do you mean by "I glow it for 30 seconds"? How is the LED turned on and off?

How is the LED turned on and off?

Equally, why can't you record when that happens, using millis()?

Every time the LED turns off, subtract the on time from the off time, to get the duration, and increment the total duration by that amount.

vennishmuthu, maybe start with one of the example software sketches that comes with every Arduino installation: Use the menus to find:

File>Examples>Digital>BlinkWithoutDelay

Use that to understand about the millis() variable.

Add a variable to save the time the LED will be on. Send that data also to the serial monitor.

Start experimenting and learning...