Realization of a diffraction-grating autocorrelator for single-shot measurement of ultrashort light pulses duration