The timeframe all depends on the house. Over the last 30 years, we've bought three homes. The first one was an absolute breeze and never caused us heartache. The second one, was a bit of a troublemaker but we just worked our way from room to room, rehabbing the entire house a little bit at a time.
This last one has been a nightmare for the 4 years we've owned it. We've blown through our savings and still don't see the light at the end of the tunnel. Without going into needless detail, on top of a qualified home inspector, I would suggest going to the city/county permitting office to make sure permits were pulled for anything that's been recently done. In our case, the the biggest issue with this property was that apartment over garage was done illegally and we had to completely gut and start over. Unfortunately, the entire reason we picked this house was for that apartment as it was for our daughter to live in.
My intention isn't to scare you but just be sure to perform due diligence and don't be afraid to further investigate potential issues.