Understanding rc time constant
The voltage across a capacitance \$C\$ at time \$t\$, which was initially at voltage \$V_0\$, which is discharging through a resistance \$R\$, is given by:

$$ V(t) = V_0 e^{\frac{-t}{RC}} $$

Charging a capacitor with a battery of voltage \$V_b\$ through a series resistor is similar:

$$ V(t) = V_b(1-e^{\frac{-t}{RC}}) $$

From these equations, you can see as time goes on, the capacitor voltage approaches its final value (\$0V\$ for discharging, \$V_b\$ for charging) but never reaches it. So, if you want to know how long it takes to (dis)charge, you first have to decide at what point to call the capacitor (dis)charged.

Let's say we want to define 99% discharged as "discharged". How long will this take? Say we had a capacitor charged to \$1V\$; when it is "discharged" it will be at \$0.01V\$. We can substitute these values into the first equation and solve for \$t\$:

$$ 0.01V = 1V\cdot e^{\frac{-t}{RC}} $$

$$ \require{cancel} \frac{0.01\cancel{V}}{\cancel{1V}} = e^{\frac{-t}{RC}}$$

$$ ln(0.01) = \frac{-t}{RC} $$

$$ -ln(0.01) RC = t $$

$$ 4.6 RC \approx t $$

\$RC\$ is the time constant, so this tells us that after about 4.6 time constants, the capacitor will be 99% discharged. The same is true for charging.