The invention relates to a method for controlling a current to a light-emitting diode in order for it to emit a desired light flux, wherein the current is determined depending on a time period during which the light-emitting diode is supplied with current, in order to generate the desired light flux for said light-emitting diode.