Best way to find delay between receive data from USART
Realize that interrupt routine is only the code to be jumped into, nothing more. So, your code totally a misunderstatement:


Your most variables there must be static. In your code they are stacked locals which are recreated at every interrupt. Also
because of undetermined code flow caused by interrupts, you have to
disable possible optimizations on vulnerable variables by declaring
them as "volatile".
Don't make that kind of loops there. Realize that every interrupt
etrance is the part of data collecting loop.


To solve the problem, your best shot is using a hardware timer. At every interrupt etrance, take a reading from a timer which is reset by the previous interrupt's exit code. So, you can easily determine if there is a overflow and take care of it.