I was wonder exactly the same thing. I am no expert, but my understanding is that once sold for a gain, you would have to declare that gain and start your position over. There is no time issue for a capital gain, only when declaring a loss.
A disposition of stock creates a capital gain or loss. A capital gain is taxable in the year of disposition. A capital loss is considered superficial and not deductible if the same stock is repurchased prior to the 31st day after initial disposition. There is no such thing as a deferal of Capital Gain in stock. BUSTED SD!
If you sell a stock with a gain, you have to report the gain. If you sell a stock at a loss and buy the stock back within a certain number of days (off the top of my head I think it's 30 days), then that is considered a superficial loss and you cannot claim the loss....something like that