We have developed a novel method to measure the relaxation time of flux pinning of type-II superconductors by using a double pulsed field. The magnetic fields are applied to the specimen two times successively. The time between two pulsed fields, t, is adjustable in a time range of milliseconds to any longer time by using twin capacitor banks. The magnetization curve by the first field starts from zero and shows a residual magnetization M1. In the second field, the magnetization starts from M2, which is smaller than M1 due to relaxation. But as the field increases and in high fields, the magnetization curve is identical with the first one and comes back again to the same residual magnetization M1. We can measure M1 and M1 - M2 precisely and obtain a t-dependence of ( M1 - M2) M1. This method is applied to study the relaxation measurement of YBCO samples and the result is consistent with the theory.