A method for controlling an image forming apparatus including a first processing unit configured to execute a first type function, a second processing unit configured to execute a second type function different from the first type function, a power supply unit configured to supply power to the first processing unit and the second processing unit, and a storage unit configured to store a first guaranteed time during which the power supply to the first processing unit is maintained, and a second guaranteed time during which the power supply to the second processing unit is maintained, the method comprising:
- comparing both the first guaranteed time to a first elapsed time from a state wherein there is not an operation request of processing of the first type function, and the second guaranteed time to a second elapsed time from a state wherein there is not an operation request of processing of the second type function,
- controlling power supply such that the power supply to the first processing unit is maintained before the first guaranteed time stored in the storage unit elapses after the first processing unit executes the first type function, and controlling power supply such that the power supply to the second processing unit is maintained before the second guaranteed time stored in the storage unit elapses after the second processing unit executes the second type function, and
- controlling power supply such that the power supply to the first processing unit is stopped when the first guaranteed time stored in the storage unit elapses after the first processing unit executes the first type function, and controlling power supply such that the power supply to the second processing unit is stopped when the second guaranteed time stored in the storage unit elapses after the second processing unit executes the second type function.