Precision measurement of D meson mass differences