Turn the switch on and off to set the capacitor voltage.
Provides +5 volt at output of op-amp for a number of cycles equal to initial voltage of capacitor (e.g: 7 V gives 7 cycles of positive voltage). The given configuration stays accurate for up to about 400 V.