Take a look at this page.
Have you had calculus yet?
A capacitor discharging through a resistor is an exponential function. (Since the current is not constant, you cannot use C = I x t except for "one instance" in-time.)
The circuit schematic is too far away, but let me guess :The capacitor is in parallel with the LED.The switch is in parallel with the LED.The resistor is not used.
See the attached schematic.
QuoteSee the attached schematic.You short the supply into the capacitor - add a small value resistor in series with the switch if you want to avoid welding it shut and resetting the Arduino!