Short answer: a while
Long answer:
It takes time, practice and patience for your body to adjust. There's certainly not going to be an exact/specific amount of time and it varies for everyone. The key, as others have stated, is
patience and to
relax. Do not rush it. This applies to your partner as much as you. A respectful and patient partner is absolutely essential, and if he is pressuring you or making you feel inadequate for not being able to take his cock easily then he is not the right match for you.
There's so much focus on being able to take a big cock and take it well, but the whole point of sex is enjoyment! The objective should not be to take a big cock but to take a cock that feels good
to you. Size is not the point. It's not like porn where a guy is just being absolutely slammed by a huge cock. The focus should not be on convincing your body that it feels good, but to listen to your body, it is telling you what feels good. Remember, your ass' purpose is to hold shit it, not to take it

It can only do one or the other very well, to some degree anyway. You don't want to ware it out
too much 
Then you have tops telling you your ass is "too loose" lol, it's a double edged sword.
As much as we idolize big cocks, having one is a mixed blessing. Not many people, men and women, can comfortably enjoy big cocks, which leaves those men with them chronically unsatisfied. That deprivation can lead to pent up frustration, which in the wrong guy can result in some passive aggressive release during sex, i.e. maybe pushing a little too hard too fast resulting in pain for you. Remember you're the one that has to live the results, not him, so protect yourself and control the pace as you're getting comfortable. I'm not saying this guy is like that, just be careful and make sure you're going at the right pace for you.
In conclusion, do what you want, I'm not telling you what to do. Just remember to go at your pace and have fun! If it's not fun or pleasurable then you have to ask why you're doing it. It will take time.