Methods and systems for adjusting exhaust valve timing of an engine are described. In one example, exhaust valve timing of a compression ignition engine is adjusted responsive to a difference between a commanded exhaust valve opening timing and an actual exhaust valve opening timing, the actual exhaust valve opening timing determined from cylinder pressure.