The pacing rate needs to be calculated for the next packet to be sent, not for the next byte to be sent.