Police officers have pulled you over and explained that they did so because you had a taillight out, were speeding or driving erratically. You disagree, suspecting from past experience that you were pulled over for discriminatory reasons and could even be falsely arrested or brutalized.
You keep quiet about your suspicions, and now the police officers seem to want to slap a serious charge on you. This is despite the fact that you cooperated with police, respectfully telling them that you are not going to say anything and that you do not consent to your car being searched. They threaten to get a warrant. You say that is fine--you are still not giving your permission for them to search your car, so, yes, a warrant is necessary. How long can the police keep you waiting?
In theory, they should not keep you long
In theory, police officers should keep you waiting only as long as it would reasonably take for them to run your tags and perform other routine tasks at a traffic stop. Generously, that might take 15 minutes or 20 minutes. A traffic-stop delay of, say, five or 10 minutes would probably be seen as reasonable when police are trying to get a search warrant or to get a K9 dog to sniff for drugs. Fifteen or 20 minutes is veering into murky territory, and an hour definitely seems unreasonable.
However, you do not have a wealth of options here. If you feel you are being unreasonably detained and simply drive off, that could get you in trouble, unfair as it is. On the other hand, if you say something like, "I have been kept waiting unreasonably long. I want to confirm I am free to go," the police officer might simply say, "No, you are not."
Your flexibility in such a moment is limited, but at your earliest opportunity, you can get in touch with a lawyer and explain what happened. If you did end up arrested, falsely or not, after being made to wait excessively long, that waiting time could definitely factor into the legitimacy of your charges.