An adaptive scheme for measuring NMR spin-lattice relaxation times