What has worked for you to keep it hard longer?

I never had problems in getting it hard. But many times, I came the moment it entered the vagina!
When I had a steady relationship for a really long time and we had sex fairly regularly, then with the time, I could hold the erection a little longer after penetration.

But I don’t have this luxury of time everytime. Most of the posts on mojo are about the difficulty in getting it up. Can you share experiences where you never had issue in getting it up but used to struggle keeping it up for longer? What worked for you?