measuring ON time and off Time of PWM pulse

HI all,
My requirement is to measure the ON time and OFF time of a PWM signal (amplitude 0-5V) generated by some external device.please help me in this regard.

Thanks

What range of on and off times?

I would try using an oscilloscope.

pulseIn - called twice consecutively to synchronize?

you can get an approximated result by measuring the signal:
(assuming that it is a two level signal [0,Vm] ) if you know the period T you can get Ton integrating the waveform over T and then divide by Vm while Toff = T- Ton
If you don't know the period you can sample and count the samples (obviously you need to chose an appropriate sampling frequency)

A multimeter is a good averager, they use integrating ADCs...

krishna_madan:
My requirement is to measure the ON time and OFF time of a PWM signal (amplitude 0-5V) generated by some external device.please help me in this regard.

Is the PWM consistent or rapidly changing? Do you want the length of each PWM transition, a rolling average or an accumulation over time. How accurate does the timing need to be (milliseconds or microseconds)

As MarkT says, use a multimeter, but make sure it's an analogue one (with a moving pointer). The mechanical inertia of the movement will even out the pulses and give a rough indication of duty cycle.