  In an inhomogeneously doped magnetic semiconductor spin relaxation time T_1
can be determined by all-electrical measurements. Nonequilibrium spin injected
in a magnetic p-n junction gives rise to the spin-voltaic effect where the
nonequilibrium spin-induced charge current is very sensitive to T_1 and can
flow even at no applied bias. It is proposed that T_1 can be determined by
measuring the I-V characteristics in such a geometry. For a magnetic p-n
junction where the results can be calculated analytically, it is in addition
possible to extract the g-factor and the degree of injected carrier spin
polarization.
