An implantable medical device comprising stimulation circuitry adapted to
provide neural stimulation energy to a neural stimulation electrode, one
or more timers, including at least one neural event timer, a device
behavior memory including a neural table, and a comparison circuit. The
neural table maps a particular device state defined at least in part by a
neural event timer to one or more associated device actions that include
at least one of a neural stimulation energy delivery, a change in state
of at least one neural event timer, and both a neural stimulation energy
delivery and a change in state of one or more timers. The comparison
circuit is adapted to compare a current state of one or more timers to a
device state in the neural table and, if found to match, causing
performance of one or more associated device actions.