I was thinking 3 years, but the USPTO would probably have a tough time actually granting the patent that quickly.
But, yes: the current system is undoubtedly broken. Terms are way to long (for software, at least), and too many patents are clearly violating the novelty bar.
I don't have anything against software patents per se, and your example, I think, is a good one, but 20 years in a field moving as fast as software is ridiculous (I'd push for 5 years at most), and the ability to be issued a patent on trivial bullshit is insane.