I don't think there's a defined or predetermined length of time or amount of effort necessary for a girl to give you a yes.
From a woman's perspective, though, we don't say yes immediately, as we want to make sure that we are making the right decision. Being in a relationship is a serious thing; hence, no one should engage in it halfheartedly. If a woman sees that you have genuine intention, and that she's really into you, then she will say yes even if you think you haven't given your best effort yet.
If you are asking this because you are getting mixed signals. I think both of you should talk things over and decide whether there's really a chance that you can take that friendship into a higher level. Because if what you want isn't what she wants then that's the time for you to make a choice whether you will pursue her further or you will stop. If she tells you to wait, it's still your call to decide.
Am guilty i must confess. Guilty of what you might ask? Well, you asked how long to work and wait in anticipation of that "yes" you so desire to hear from someone you"re willing to give your commitment, emotionally, right?
Those weren't the exact words you used, but it is at least exactly the way i felt before putting in two years in the pursuit of love, that was my first relationship and gosh! I was in love. It didn't matter the amount of effort and how long it took for her to come around the idea, all that was of concern to me was getting that opportunity to continually express my undying love for her. Unfortunately, it ended a while ago. I still have some certain amount of feelings for her in a way a brother does even though we're continents apart.
Just like @greencrayon stated below, there's no defined or predetermined length of time expected of a person to put in effort in the pursuance of the one they love. It is of your personality. Regardless of their feelings, some folks lack the patience, some have egos and some might just have a certain feeling of embarrassment everytime they get turned down. It is only normal for people of such personality to back down in such situations.
Anyways, love is not a feeling that sparks at first contact, it is a process, an act of true emotional expression that needs to be found, built from within the heart, nurtured and maintained in the best way possible. In saying so, time shouldn't in anyway stand as a draw back when seeking a yes from that person who grips your heart as feelings grow stronger by each passing moment.