Calculate loss for a TCP stream over time intervals