It is said dhul qarnayn, a righteous king, would make dicisions, with the affairs of his people, and would always judge with a sound mind, wisdom.
Ibless shaytan, tried to make fitnah, for him, and came disguised, as a wronged old man, with needs and would bother him, with complaints and help, to the righteous king, who Allah mentioned in the quran, did not lose his temper with this old man. As this is shaytans trick, to make him lose his good, attribute or quality, of character.
he figured who this old man was, as he had foresight of a believer, he saw with the light of allah, and iblees, told him why he did what he did.
If you wish to have self control and patience, never get angry.....