Sirach (Ecclesiasticus) 11:27

The affliction of an hour maketh a man forget pleasure: and in his end his deeds shall be discovered.

Brenton's English Septuagint