Good question. Time starts from when you are discharged. This has gotten to be a big problem. Before you would state I intend to surrender and the bank takes back property. Now what they are doing is not foreclosing until many months later after you receive your discharge if even then. You have been discharged of the debt to the mortgage company. You are right in saying 2 years to get an FHA type loan from discharge. A normal conv. loan will take you at least 4 years from discharge to obtain. Be aware that HOA fees accumulate from date of filing forward in your state so you still may get dinged for those and you will still owe them until title of the property is transferred.
If you are still incurring HOA fees and are worried that the lender still has not taken the property, ask your attorney about filing a "Motion to Compel Possession or Transfer of Title." The purpose of the motion is to get a court order forcing the lender to finish the foreclosure, take the house, and transfer the title on time.
This is not a well-established motion nor is it routine. A few judges might grant it. Here's why some homeowners may want to force the bank to take the hous:
1) Around summer 2009 in South Florida, a homeowner surrendered his property in bankruptcy and moved out. Bank still didn't foreclose even after bankruptcy discharge. Neighborhood child invaded the backyard, drowned in the swimming pool and died. Homeowner was liable for the death because title was not yet transferred. Homeowner cannot discharge himself of that liability obligation because he already used up his bankruptcy.
2) You may still be liable for property taxes (in addition to HOA fees) until the transfer of title.
3) You may be interested in moving on, and this house might be blocking your way.