A method for traffic management at a network node in a packet-switched network, the network node comprising at least one egress port for outputting packets belonging to a packet flow, and one or several ingress ports for receiving incoming packets of the packet flow, the method comprising: perform traffic shaping on a current packet belonging to the packet flow and stored in a memory queue associated with the packet flow, the traffic shaping comprising: if a theoretical reception time, TRT, value of the current packet is smaller than or equal to a time counter value, output the current packet through the egress port; wherein the TRT value of the packet is determined by performing traffic policing of incoming packets of the packet flow, using, (a) when a previous packet of the packet flow received before the current packet has not been discarded by traffic policing, (i) a size of the previous packet, (ii) a transmission rate value associated with the flow, and, (iii-1) if a TRT value of the previous packet is greater than an actual reception time, ART, value of the previous packet, using the TRT value of the previous packet, or (iii-2) if the TRT value of the previous packet is not greater than the ART value of the previous packet, using the ART value of the previous packet, or, (b) when the previous packet has been discarded by traffic policing, using the TRT value of the previous packet. perform traffic shaping on a current packet belonging to the packet flow and stored in a memory queue associated with the packet flow, the traffic shaping comprising: if a theoretical reception time, TRT, value of the current packet is smaller than or equal to a time counter value, output the current packet through the egress port; wherein the TRT value of the packet is determined by performing traffic policing of incoming packets of the packet flow, using, (a) when a previous packet of the packet flow received before the current packet has not been discarded by traffic policing, (i) a size of the previous packet, (ii) a transmission rate value associated with the flow, and, (iii-1) if a TRT value of the previous packet is greater than an actual reception time, ART, value of the previous packet, using the TRT value of the previous packet, or (iii-2) if the TRT value of the previous packet is not greater than the ART value of the previous packet, using the ART value of the previous packet, or, (b) when the previous packet has been discarded by traffic policing, using the TRT value of the previous packet. if a theoretical reception time, TRT, value of the current packet is smaller than or equal to a time counter value, output the current packet through the egress port; wherein the TRT value of the packet is determined by performing traffic policing of incoming packets of the packet flow, using, (a) when a previous packet of the packet flow received before the current packet has not been discarded by traffic policing, (i) a size of the previous packet, (ii) a transmission rate value associated with the flow, and, (iii-1) if a TRT value of the previous packet is greater than an actual reception time, ART, value of the previous packet, using the TRT value of the previous packet, or (iii-2) if the TRT value of the previous packet is not greater than the ART value of the previous packet, using the ART value of the previous packet, or, (b) when the previous packet has been discarded by traffic policing, using the TRT value of the previous packet. (a) when a previous packet of the packet flow received before the current packet has not been discarded by traffic policing, (i) a size of the previous packet, (ii) a transmission rate value associated with the flow, and, (iii-1) if a TRT value of the previous packet is greater than an actual reception time, ART, value of the previous packet, using the TRT value of the previous packet, or (iii-2) if the TRT value of the previous packet is not greater than the ART value of the previous packet, using the ART value of the previous packet, or, (iii-1) if a TRT value of the previous packet is greater than an actual reception time, ART, value of the previous packet, using the TRT value of the previous packet, or (iii-2) if the TRT value of the previous packet is not greater than the ART value of the previous packet, using the ART value of the previous packet, or, (b) when the previous packet has been discarded by traffic policing, using the TRT value of the previous packet.