Influence of timing between magnetic field and fluid flow in a rotary magnetic refrigerator