You may purchase the same stock back at any moment, and this has no influence on the profit sale you made. The rules only require you to pay taxes on any profit you make from assets.