Time-resolved mass spectrometry