The hot subdwarf HD 49798 has an X-ray emitting compact companion with a spin-period of 13.2 s and a dynamically measured mass of 1.28 \pm 0.05 { M } _ { \odot } , consistent with either a neutron star or a white dwarf . Using all the available XMM-Newton and Swift observations of this source , we could perform a phase-connected timing analysis extending back to the ROSAT data obtained in 1992 . We found that the pulsar is spinning up at a rate of ( 2.15 \pm 0.05 ) \times 10 ^ { -15 } s s ^ { -1 } . This result is best interpreted in terms of a neutron star accreting from the wind of its subdwarf companion , although the remarkably steady period derivative over more than 20 years is unusual in wind-accreting neutron stars . The possibility that the compact object is a massive white dwarf accreting through a disk can not be excluded , but it requires a larger distance and/or properties of the stellar wind of HD 49798 different from those derived from the modelling of its optical/UV spectra .