Even two or three days can be enough to have MOST chicks sired by the new rooster, but more days make it more likely, and it takes 3 weeks or more to be completely positive.I only have to wait 4-7 days when I'm wanting specific chicks.
Someone did studies decades ago and found a few eggs could be fertile 3 weeks after the last mating, and we see occasional stories on this forum too. (When the rooster died or was sold, or when different roosters sire very different-looking chicks, is when people notice it and come ask questions.)
So it just comes down to how sure you need to be, and how much time you're willing to spend to get that level of certainty.