There is really no timeframe in which you need to do this. You can pay out-of-pocket for an expense today and reimburse yourself 20 years later. The only requirements are that you had your HSA established at the time the expense was incurred (see more below) and such expense was not reimbursed in any other way. And remember, always hold onto your receipts!
Please note that there is some gray area with regards to when an expense in “paid” vs. “incurred”. The conservative interpretation is that the day the expense is incurred is when the accountholder’s obligation happens, rather than when it is paid. This usually means date of service. The IRS has not come up with any definitive interpretation to-date (as of Jan 2019).
According to regulations under Section 1.213-1(a)(1), the IRS makes it clear that payment of medical expenses is different than incurring a medical expense. This is why we would recommend establishing your HSA as soon as possible so you can maintain flexibility for what expenses are eligible for payment/reimbursement.
Please check with your tax and/or a legal professional on this stuff, though. This is not intended to be tax or legal advice.
Source: IRS Notice 2004-50 Q&A 39