Method for high-resolution frequency measurements in the extreme ultraviolet regime: random-sampling Ramsey spectroscopy.