Assuming you're referring to a romantic partner:
It depends on the guy and the situation. If he's the type of person who is very in touch with his emotions and feelings, it might not take long at all for him to realize he misses you. On the other hand, if he's someone who takes more time to process his emotions, it might take a little longer for him to come to that realization. Ultimately, there is no set time frame for how long it takes a guy to realize he misses you - it all depends on the individual.