When is the best time to take ibuprofen for pain management?

When is the best time to take ibuprofen for pain management?