Gradient time-shape measurement by NMR