implements network latency emulation