How much time does it take for the food to become semen/sperm?

Continuously made. You make semen continually from nutrients in your body. You make more during times when romance is intensive in your life. This will happen even if you're not eating for some reason.
Here are some ... Why do you ask this question? For any practical use or just filling curiosity? Physiologically, the body is a set of constantly changing & adjusting machine to make its hosts - us - to gain a best possible inside & outside environment to undergo self-healing process for sustaining optimal function for survival, growth, & continuation with host's own residual strength with a widely variable pace ..