So how is you code? If you will be using the h/w serial, what I do is use the flexitimer2 library and serial.event.
At each serial.event, at the start I stop flexitimer2 from running. After the new byte has arrive, I run flexitimer2. So as long as new data keeps arriving within the set timeout for flexitimer2, flexitemer2 will never run the function its supposed to run. If no new data has arrived and timeouts, flexitimer2 then runs the the specified function.
In my specified function, i just raise a flag to indicate that I should already read the buffer. Hope this helps. I posted the code in my favorite local forum as my code is related to specifc local product. In the code, the flexitimer2 is alyastmr2. Its a modified flexitimer2 tha supports the particular cpu I am using.