A typical "no-asset" Chapter 7 will take approximately 3 to 6 months to complete, depending on the Trustee. Accordingly, a foreclosure will be delayed for about this long, unless you are not the typical no-asset Chapter 7 OR the foreclosing bank seeks to lift the bankruptcy stay to continue the foreclosure.
In my opinion, filing a bankruptcy case solely so the automatic stay can kick in and delay a foreclosure for a short while is bad faith. If your 11 was open during the past year, you won't have a stay at all after 30 days unless you persuade the court by clear and convincing evidence that your new filing is in good faith. A judge who heard you wonder about ways to "fight or postpone" a foreclosure would probably rule against you.