  Many analyses based on the time-dependent Ginzburg--Landau model are not
consistent with statistical mechanics, because thermal fluctuations are not
taken correctly into account. We use the fluctuation-dissipation theorem in
order to establish the appropriate size of the Langevin terms, and thus ensure
the required consistency. Fluctuations of the electromagnetic potential are
essential, even when we evaluate quantities that do not depend directly on it.
Our method can be cast in gauge-invariant form. We perform numerous tests, and
all the results are in agreement with statistical mechanics. We apply our
method to evaluate paraconductivity of a superconducting wire. The
Aslamazov--Larkin result is recovered as a limiting situation. Our method is
numerically stable and the nonlinear term is easily included. We attempt a
comparison between our numerical results and the available experimental data.
Within an appropriate range of currents, phase slips occur, but we found no
evidence for thermally activated phase slips. We studied the behavior of a
moderate constriction. A constriction pins and enhances the occurrence of phase
slips.
