An internal combustion engine includes: a variable valve timing mechanism
for changing a valve timing of at least one of an intake valve and an
exhaust valve; a pressure for detecting an intake pressure and an exhaust
pressure of the internal combustion engine that pulsate in association
with the actions of the piston, the intake valve, and the exhaust valve;
and controller for setting the valve timing based on a magnitude
relationship between the intake pressure and the exhaust pressure
detected by the pressure detector.