A camera flashlight works on the capacitor's charging and discharging principle. On pressing the shutter button, a short burst of current provided by the charged capacitor creates a flash. To understand the charging of a capacitor, consider an RC circuit connected in series to an ideal battery. When the switch is closed, the capacitor begins to charge. The battery's emf is distributed between the resistor and capacitor. The potential difference across the capacitor increases until it is equal to the battery's emf. Applying Kirchoff's rule, a differential equation is obtained, which can be integrated to obtain an expression for the charge of the capacitor as a function of time. By differentiating with respect to time, an expression for the charging current is obtained. The current has its maximum value when time equals zero and decays exponentially to zero when time approaches infinity. Conversely, the charge of the capacitor increases exponentially from zero to maximum as time approaches infinity. Here, R-C is the time constant. It is the time interval when current and charge attain the given values.