The Wisdom of Jesus the Son of Sirach, or Ecclesiasticus

Chapter 35
1until he has rendered to every man according to his deeds, and repaid the works of men according to their plans, until he has judged the cause of his people, and he will make them rejoice in his mercy.