Temporal superresolution: An application of frequency filtering by a grating in the resonance domain