I recommend talking to a nutritionist if you have specific questions about your diet. A general rule of thumb is to eat 1 to 2 hours before a workout, with a focus on carbs and protein. Everyone is different, so it is best to consult a medical professional with any questions about your personal diet needs.