What happens to the time taken for the capacitor to charge and discharge when you increase the resistance in the circuit?

It increases. The time constant of a simple RC circuit is RC, resistance times capacitance. That is the length of time it will take for the capacitor voltage to reach about 63% of a delta step change. Ratio-metrically, if you double the resistance, you will double the charge or discharge time.