Patent ID: 8717898

Claim:
A method for calculating packet arrival time interval, used to calculate the time interval of the packet of each flow arriving at the network node so as to determine the quantity of tokens in the token bucket of each flow, wherein the method comprises: when the current packet arrives, reading system current time T 2 from a timer, and reading the arrival time T 1 , recorded in an external RAM, of previous packet of the flow to which the current packet belongs, wherein when the timer implements a cycle timing with a period of preset time period T max , the preset time period T max is larger than or equal to the time for filling the maximum depth of the token bucket of the flow at the minimum token injection rate; reading a current flag bit, recorded in an internal RAM, of the flow to which the current packet belongs, wherein the current flag bit is used for indicating the number of cycles of the timer between the system current time T 2 and the arrival time T 1 of the previous packet; and calculating the arrival time interval of the present packet according to the system current time T 2 , the arrival time T 1 of the previous packet and the current flag bit.