Creating a lit object with a limited lifetime

I’m really new to Inform7, I just started yesterday in fact. I’ve read through a lot of the documentation, but I can’t seem to figure out how to make an object (for example a candle) with a limited lifetime. I want the counter to only tick down when the object is lit/burning. I’ve found plenty of documentation for candles and lit objects in general, but I can’t figure out how to give it a limited lifetime. If anyone could help or point me in the right direction as far as documentation goes, I’d be incredibly grateful.

I’m guessing a rule like Every turn when the white candle is lit, decrease the lifetime of the white candle by one. I’m guessing you know how to give a numeric property to the candle?
(I typed that from memory, so if I typoed the code let me know.)

Example 406 of the Inform documentation, “The Cow, Exonerated,” has a lot of stuff about matches burning down – you probably don’t need most of it for your purposes, but you can probably winkle out some of the stuff you need from it. (I don’t think it includes a provision for snuffing something and relighting it, but that shouldn’t be too hard to code.)

Thanks all. The Cow, Exonerated has exactly the sort of code I was looking for. It should be very easy to modify to fit my needs.