I stand corrected. To add, usually the H1B holders begin the green card process as soon as possible (with the help of their company). Technically, at least 365 days prior to the day in which the six-year limit was reached and then H1B visa may be extended in one-year increments.
H1B is valid for a maximum of 6 years. Then you need to leave for a set period of time.