Characterization of local order in thin films is challenging with pair distribution function (PDF) analysis because of the minute mass of the scattering material. Here, it is demonstrated that reliable high-energy grazing-incidence total X-ray scattering data can be obtained in situ during thin-film deposition by radio-frequency magnetron sputtering. A benchmark system of Pt was investigated in a novel sputtering chamber mounted on beamline P07-EH2 at the PETRA III synchrotron. Robust and high-quality PDFs can be obtained from films as thin as 3 nm and atomistic modelling of the PDFs with a time resolution of 0.5 s is possible. In this way, it was found that a polycrystalline Pt thin film deposits with random orientation at 8 W and 2 × 10−2 mbar at room temperature. From the PDF it was found that the coherent-scattering domains grow with time. While the first layers are formed with a small tensile strain this relaxes towards the bulk value with increasing film thickness.