Pretty generous - the criteria in the regulations are that it be 80% vacant (by square footage or acreage) for one year or more. This period extends to three years or more if the vacancy arose after the corresponding census tract was designated as a Qualified Opportunity Zone (QOZ). There are also special rules for Brownfield sites and property condemned or seized by the government.