measuring power consumption

Hello again, another basic question from an electronics noob.

How might I measure the power consumption of an arduino based project? Say for example I have a hello-world style arduino project, powered by a battery, with some blinking lights. Knowing the power capacity of the battery, how would I predict the battery life?

Measure the current drain using a amp meter (or amp setting of a multi meter). This gives you a figure in amps. Then take the batteries rating in amp hours and see how many hours your system will run for.

For example if your system takes 100mA thats 0.1A. With a 2 A/H battery it would run for 2/0.1 = 20 hours.

This is of course only an approximate calculation as in practice the amp hour capacity of a battery is often not quite what is quoted.