A controller (124, 300, 700) for use in a power converter, comprising: a drive circuit (126, 326, 726) coupled to generate a drive signal (144, 344, 444, 544, 644, 744, 844) to control switching of a power switch to control a transfer of energy from a power converter input to a power converter output; an input adapted to receive an enable signal (138, 338, 438, 638, 738) that is representative of the output of the power converter and informs the controller to enable or disable the power switch, wherein the enable signal includes enable events responsive to the power converter output and which cause the power switch to be enabled or disabled, wherein the drive circuit (126, 326, 726) is coupled to turn on the power switch for a said ON time in response to the enable events and wherein the drive circuit is coupled to turn off the power switch in response to a power switch current reaching a variable current limit threshold that varies in response to a time between successive enable events of the enable signal; and characterised by a current limit threshold generator (128, 328, 728) coupled to generate the variable current limit threshold, wherein the variable current limit threshold generator is coupled to increase, within a current limit threshold range, the variable current limit threshold at an increase rate during a fixed time period after an end of each ON time of the power switch, and wherein the current limit threshold generator is coupled to decrease the variable current limit threshold, within the current limit threshold range, after the fixed time period at a decrease rate until the power switch current reaches the variable current limit threshold. a drive circuit (126, 326, 726) coupled to generate a drive signal (144, 344, 444, 544, 644, 744, 844) to control switching of a power switch to control a transfer of energy from a power converter input to a power converter output; an input adapted to receive an enable signal (138, 338, 438, 638, 738) that is representative of the output of the power converter and informs the controller to enable or disable the power switch, wherein the enable signal includes enable events responsive to the power converter output and which cause the power switch to be enabled or disabled, wherein the drive circuit (126, 326, 726) is coupled to turn on the power switch for a said ON time in response to the enable events and wherein the drive circuit is coupled to turn off the power switch in response to a power switch current reaching a variable current limit threshold that varies in response to a time between successive enable events of the enable signal; and characterised by a current limit threshold generator (128, 328, 728) coupled to generate the variable current limit threshold, wherein the variable current limit threshold generator is coupled to increase, within a current limit threshold range, the variable current limit threshold at an increase rate during a fixed time period after an end of each ON time of the power switch, and wherein the current limit threshold generator is coupled to decrease the variable current limit threshold, within the current limit threshold range, after the fixed time period at a decrease rate until the power switch current reaches the variable current limit threshold.