Perceived duration of a sensory event often exceeds its actual duration. This phenomenon is called time dilation. The distortion may occur because sensory systems are optimized for perception within their respective modalities and not for perception of time. We investigated how the dilation of visual events depends on the duration and content of events. Observers compared the durations of two successive visual stimuli while the luminance of one of the stimuli was modulated at different temporal frequencies. Time dilation correlated with the frequency of modulation and the duration of the stimulus: the faster the modulation and the longer the stimulus duration, the larger the dilation. Notably, time dilation was also accompanied by a decreased sensitivity to stimulus duration. We show that these results are consistent with the notion that stimulus duration is estimated using measurement intervals of the lengths that depend on stimulus frequency content. Estimation of temporal frequency content is more precise using longer measurement intervals, whereas estimation of temporal location is more precise using shorter ones. As a result, visual perception will benefit from using longer intervals when the stimulus is modulated so that its frequency content is measured more precisely. A side effect of using longer temporal intervals is a larger uncertainty about the timing of stimulus offset (temporal location), ensuing time dilation and the reduction of sensitivity to duration. Our findings support the view that time dilation follows from basic principles of measurement and from the notion that visual systems are optimized for visual perception rather than for perception of time.