A novel synchrotron technique for studying diffusion in solids