1. A control device, comprising:an AC-DC converter to convert power supplied from a commercial power source into DC;
a DC-DC converter to supply the DC to a fixing heater;
a calculator configured to calculate a target DC voltage of the DC to be supplied by the DC-DC converter to the fixing heater, based on a detected temperature of the fixing heater detected by a temperature sensor;
an overcurrent detection unit configured to output an interruption signal when an overcurrent detection value is detected in a circuit including a switching element; and
a controller configured to control an output of the DC-DC converter and configured to calculate switching time for switching the switching element so that the output of the DC-DC converter reaches the target DC voltage, wherein when the controller receives the interruption signal output by the overcurrent detection unit, the controller stops the switching of the switching element and the controller does not recalculate the switching time and instead continuously uses the previously calculated switching time after resuming switching of the switching element at a next switching cycle.