The Kelvin-Helmholtz mechanism (KH mechanism) is an energy source in something shrinking, from gravitational potential energy released. The energy can be significant when gravity is significant, such as a body held together by self-gravity. It is considered a power source for stars, originally proposed as the mechanism for the Sun's present luminosity, but when fusion was established as that mechanism, is considered a secondary source, of significance before and after a star's main sequence. It is also significant in the accretion of material by compact objects, and in the gas accretion during planet formation. The energy raises the temperature of the object, resulting in thermal emission, regulated by the body's opacity. Continued shrinkage depends upon the radiation: the raised temperature increases internal pressure, thereby slowing shrinkage, and radiation transfers heat away, lowering the temperature and pressure, allowing shrinkage to resume. The Kelvin-Helmholtz timescale (KH timescale or thermal timescale or Kelvin time) is the timescale over which such a process occurs, considering the interaction of the effects of gravity, the pressure due to any resulting temperature increase, and the cooling effect (transfer of the internal heat's energy) of emitted radiation.