One embodiment of the present invention provides an apparatus that measures the average-output-current produced by a switching
regulator within an electronic device. The apparatus includes current-sensing-circuitry coupled to a switching field-effect-
transistor (FET) within the switching
regulator, wherein the current-sensing-circuitry is configured to bypass a small sense current from the conducting current of the switching-FET according to a sense ratio, wherein the conducting current is controlled by a
control signal for the switching
regulator. The apparatus also includes a current-to-
voltage-converter coupled to the current-sensing-circuitry which is configured to convert the sense current into a sense
voltage. The apparatus further includes
voltage-averaging-circuitry which is configured to produce an average-sense-voltage from the sense voltage. This sense voltage is coupled to the input of the voltage-average-circuitry through a switch, which is gated by the
control signal. The average-output-current of the switching regulator is indicated by the average-sense-voltage.