We present a new procedure that can identify and measure the critical temperature. This method is based on the divergence of the relaxation time approaching the critical point in quenches from infinite temperature. We introduce a dimensionless quantity that turns out to be time independent at the critical temperature. The procedure does not need equilibration and allows for a relatively fast identification of the critical temperature. The method is first tested in the ferromagnetic Ising model and in the two-dimensional EA model and then applied to the one-dimensional Ising spin glass with power law interactions. Here we always find a finite critical temperature also in the presence of a uniform external field, in agreement with the mean-field picture for the low-temperature phase of spin glasses.