The time a capacitor charges and discharges depends on the value of the cap, and the value of the series resistor. The charge time constant is = to the resistance times the capacitance. The cap will charge to 63% of the applied voltage in the first time constant, then 63% of the remaining voltage in the secone time constant, and so on... After 5 time constants, the cap is considered fully charged. Caps can be used as analogs to tiny batteries in circuits when a voltage is need to hold on a high impeadance node for a very short period of time, ie self-latching relays might use a large cap to hold the current on the coil during the switching time. For powering devices, it won't work however.