There is no time limit. Your friend will not have an occupancy claim as he is not a tenant. The only way he will become a tenant is if he offers and you accept rent.
An Ejectment action would be one legal recouse, but this would take some time to go through the judicial process. RCW 7.28
The better option would be to get a restraining order against him in Superior Court. The judge can order that he is prohibited from entering the premises, or coming within 100 feet of the premises, etc. The judge has discretion to word the order in a way that's appropriate to your situation. You can get a temporary restraining order ex-parte (without the other side appearing).
If your friend is not paying rent, this would be considered a tenancy at will. This means that you may kick him out with minimal notice if you feel that he is taking advantage of you. I do not feel that you would have to resort to an ejectment action, there are ways under RCW 59.12 to remove someone if they do not qualify under the Residential landlord-tenant Act.