When is the best time to discharge a capacitor