The process (Cliff's Notes version):
2017 season: Evaluate what they've got and purge the dead weight.
2018 season: Draft a potential franchise QB. Accept the fact that it'll likely be a bad season due to the dead cap money.
2019 season: Add talent with all the cap space that they cleared in 2017. Higher expectations than 2018, but don't count on playoffs.
2020 season: The real fun begins, as the QB develops and the players acquired in 2019 start to gel. Should make the playoffs or, at worst, narrowly miss.
That's a minimum of four years. If the above happens, they'll be back in 2021. They'd have to show Rex-like ineptitude to get fired any sooner. On the flip side, if the Bills make the playoffs in 2019 or 2020, we'll be seeing contract extensions for Beane and McD.