"Around 10pm, I finally stopped drinking long enough to remember I had a car in a garage somewhere."
I can't understand the above sentence clearly, especially the meaning of long enough to in this case. Could you give me another expression or and example which has the similar meaning?