An implantable device for delivering neural stimulation, comprising: a pulse generator for outputting neural stimulation pulses; one or more stimulation electrodes connected to the pulse generator for delivering electrical stimulation to a selected neural site, wherein the stimulation electrodes are configurable for delivering vagal stimulation to a patient; a controller connected to the pulse generator for controlling the output of neural stimulation pulses; wherein the controller is programmed to alternate between a neural stimulation state in which neural stimulation pulses are delivered and a non-neural stimulation state in which no neural stimulation pulses are delivered; wherein the controller is programmed to alternate between the neural stimulation state and the non-neural stimulation state according to a programmed duty cycle that specifies durations for each state; a respiratory sensor connected to the controller for enabling detection of inspiratory and expiratory respiratory phases; wherein the controller is programmed to permit neural stimulation pulses to be delivered when in the neural stimulation state only during the expiratory respiratory phase; characterized in that the controller is further programmed to maintain a record of the cumulative duration of neural stimulation and derive an effective overall duty cycle, adjust the programmed duty cycle to increase the duration of the neural stimulation state and/or decrease the duration of the non-neural stimulation state if the effective overall duty cycle is less than the desired overall duty cycle, and adjust the programmed duty cycle to decrease the duration of the neural stimulation state and/or increase the duration of the non-neural stimulation state if the effective overall duty cycle is more than the desired overall duty cycle. a pulse generator for outputting neural stimulation pulses; one or more stimulation electrodes connected to the pulse generator for delivering electrical stimulation to a selected neural site, wherein the stimulation electrodes are configurable for delivering vagal stimulation to a patient; a controller connected to the pulse generator for controlling the output of neural stimulation pulses; wherein the controller is programmed to alternate between a neural stimulation state in which neural stimulation pulses are delivered and a non-neural stimulation state in which no neural stimulation pulses are delivered; wherein the controller is programmed to alternate between the neural stimulation state and the non-neural stimulation state according to a programmed duty cycle that specifies durations for each state; a respiratory sensor connected to the controller for enabling detection of inspiratory and expiratory respiratory phases; a respiratory sensor connected to the controller for enabling detection of inspiratory and expiratory respiratory phases; wherein the controller is programmed to permit neural stimulation pulses to be delivered when in the neural stimulation state only during the expiratory respiratory phase; characterized in that the controller is further programmed to maintain a record of the cumulative duration of neural stimulation and derive an effective overall duty cycle, adjust the programmed duty cycle to increase the duration of the neural stimulation state and/or decrease the duration of the non-neural stimulation state if the effective overall duty cycle is less than the desired overall duty cycle, and adjust the programmed duty cycle to decrease the duration of the neural stimulation state and/or increase the duration of the non-neural stimulation state if the effective overall duty cycle is more than the desired overall duty cycle.