It takes roughly 8 hours for your body to fully digest a meal. It depends on the size of the meal, fibre content, fat content etc. but that's a good ball park number.
I recommend finishing eating your pre-workout meal about 90 minutes before your workout. That way the food will have finished passing through your stomach and will be in your intestines.