Yeah, probably late, but:
timer.Create( "BatteryDecreaser", 3, 1, function() battery = battery - 1 end )
I think. my timer is rusty, haven't used it in a while.
The first part is the name (BatteryDecreaser), then how many seconds you want it to wait (1) and then how many times you want it to repeat (3).
If that short way doesn't work use this:
battery = 100
function Battery()
battery = battery - 1
end
timer.Create( "BatteryDecreaser", 3, 1, Battery )
Oh, and if the second number value is turned to 0, you'll want to use timer.Destroy (or timer.Remove).