Learn about Time Constants of Capacitor Discharge. This one has time constant of 1 second, since time constant is Series Resistor multiplied by Series Capacitor (T = RC). Discharge time is 5 times of time constant, therefore it needs 5 seconds to discharge.
The charging time is also 5 seconds since the series resistor on the left side (charging side) is 1000 ohms as well.