If the amount of energy added by heating can be measured during the process, and the temperature can be measured during the process, then the Clausius inequality can be used to determine whether the process is reversible or irreversible by carrying out the integration in the Clausius inequality. If integral result is equal to zero then it is a reversible process, while if greater than zero then an irreversible process (less than zero cannot be possible).