The glib answer is, "Until it clears."
The more detailed answer is a question: "What do you wish to accomplish?" There's more than one thing involved in "nice, clear beer". Could be simple clarity, could be clear flavor/aroma, etc.
If you're only worried about visual clarity, you can fine the beer with gelatin or some other agent and have it star-bright in a matter of hours. In the majority of cases, a couple of weeks of storage in the vessel will make for clear beer. (Note that, depending on the yeast strain, simple patience may never
make for clear beer. But those occasions are rare with simple ales.)
Even if you do
use fining, a couple of weeks in secondary will help meld flavors.