Time caffeine 15 to 60 minutes before a long run
Added
If coffee already agrees with you, a dose before a long run or race may help you hold your pace longer and feel less tired. NIH's Office of Dietary Supplements says caffeine helps most with endurance activities like distance running, but responses vary and more isn't better, so try it on a training run first.
The result
Result: NIH ODS: experts suggest 2 to 6 mg per kg of body weight 15 to 60 minutes before exercise (about 210 to 420 mg for a 154-pound person); a cup of coffee has about 85 to 100 mg, and 500 mg or more a day can hurt performance and sleep.
Note: Not medical advice. Talk to your doctor or pharmacist before starting any supplement, especially if you take medications.
Source
NIH Office of Dietary Supplements: Supplements for Exercise and Athletic Performance (opens the original source in a new tab). Check it for the latest numbers before you act.