A cardiac rhythm management system modulates the delivery of pacing and/or
autonomic neurostimulation pulses based on heart rate variability (HRV).
An HRV parameter being a measure of the HRV is produced to indicate a
patient's cardiac condition, based on which the delivery of pacing and/or
autonomic neurostimulation pulses is started, stopped, adjusted, or
optimized. In one embodiment, the HRV parameter is used to evaluate a
plurality of parameter values for selecting an approximately optimal
parameter value.