added window correction to frames_to_time