You are required to give your landlord a reasonable amount of time to fix any repairs that you bring to their attention. The definition of reasonable varies widely across states. For example, in Texas, you have to give your landlord seven days to make a repair. In Massachusetts, they're required to start fixing the problem within five days. In New York, there's no explicit definition of reasonable time frames for repairs, so you need to use your own judgement and imagine how a judge would look at the situation if the case ever went to court.
What's considered "reasonable" usually varies based on how much of an emergency your situation is. If you don’t have access to running water or heat, a court would most likely rule that your landlord should address it immediately. If the issue is smaller and clearly doesn't have short-term consequences for your health and safety, then you would be expected to allow a bit more time for it to be fixed.
Once a reasonable amount of time has passed without a repair, you have a few different options: fix it yourself and deduct the cost from your rent, stop paying rent until the fix is made (this doesn't work everywhere), leave right away using a legal concept called constructive eviction, or sue your landlord for damages.
In any of these situations, you'll need to prove that the problem is real and violating the warranty of habitability. You'll always be in a stronger position if you go the extra mile by calling a housing inspector and having them check out the issue.
The information provided on this website does not, and is not intended to, constitute legal advice.