With my first novel, I found an agent in a week, and she sold the novel a couple of weeks after she had a copy in hand. I quickly learned this is not the way it usually goes.
Having an agent does not guarantee a sale at all, ever. Many novels never sell, even with an agent behind them. A novel that does sell can sell to the first publisher that sees it, and very quickly, if it's what the editor has been looking for, or very slowly, if it's a novel the editor likes, but isn't sure when and where it will fit.
When you get a good agent, and not all agents are good, even if they're honest and hard-working, or even if they've placed a novel here and there, you greatly increase your chances of selling your novel, but it's still far from certain, and it can still take years.
Like every other form of submission, don't think about it. How long it takes is completely out of your control, and the best possible thing you can do is forget about anything you have in an agent's hands, or that out on submission in any way. Spend all your time working on your next novel. That's something you can control, and having another novel ready to go before the first one has sold or been rejected for the last time is the best way you can help yourself succeed.