The second entropy is introduced, which is a new type of entropy that provides a basis for the non-equilibrium thermodynamics of time-dependent systems. Whereas the first or ordinary entropy counts the molecular configurations associated with a given structure, the second entropy counts the molecular configurations associated with a transition between two given structures in a specified time. Maximization of the second entropy gives the optimum rate of change or flux, and as such it provides a quantitative principle for non-equilibrium systems. In contrast, the second law of thermodynamics only provides a direction for change, not a rate of change. The probability distribution function for time-dependent systems is also given, which is the focal point of non-equilibrium statistical mechanics. This and the second entropy are used, for example, to derive the Langevin equation, the Green-Kubo relations, the transition and path probability, the fluctuation and work theorems, and a generalised fluctuation-dissipation theorem. They are also used to develop computer simulation algorithms suited for time-dependent systems, specifically non-equilibrium Monte Carlo and stochastic Molecular Dynamics. The analysis is illustrated and quantitatively tested for the case of steady heat flow, and for the case of time-varying, driven, Brownian motion.