We should forgive others as quickly as it takes to make the decision to pray. The Greek word for "when" means "whenever, as soon as, or while." When we stand praying, we must forgive if we have ought ("anything at all, the least little part; whatsoever") against anyone.
When we are offended or hurt, we often feel justified in holding a grudge.
The Old Testament law expressed it when it stated, "Eye for eye, tooth for tooth" (Exodus 21:23-25). Until the offense was paid, we did not feel free to forgive.
God dealt with all men's offenses by placing sin upon the perfect Savior who was judged in place of every sinner of all time. To demand that others must earn our forgiveness is not Christlike. Jesus died for every man's sins, extending forgiveness to us while we were yet sinners, and we should do the same.
It is doubtful that a person who refuses to forgive has ever experienced forgiveness himself. This is liked to the servant that Jesus talked about in Matthew 18:23-35. He was forgiven a debt of over $3,000,000,000 and yet he refused to forgive his fellow servant who owed him $3,000. The forgiveness that we have received from the Lord is infinitely greater than any forgiveness we will ever be asked to give to others.
Freely forgive as you have been forgiven.